Skip to content

Commit

Permalink
make version checker is auto
Browse files Browse the repository at this point in the history
  • Loading branch information
abdfnx committed Jan 10, 2021
1 parent bdd21b8 commit 8dbd097
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cgit
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
cona="commit name: "
brna="branch name: "
repourl="repo url: "
ver="[email protected]"
crepo="Dev-x-Team/corgit"
UNAME=$(uname)

Expand Down Expand Up @@ -49,11 +48,9 @@ function badUsage() {
}

function version() {
local v=(
"$ver"
)

printf "%s\n" "${v[@]}"
curl --silent "https://api.github.com/repos/$crepo/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}

function desc() {
Expand Down

0 comments on commit 8dbd097

Please sign in to comment.