Skip to content

Commit

Permalink
Add version to test.sh output /3 (compressor)
Browse files Browse the repository at this point in the history
  • Loading branch information
telatin committed Sep 25, 2024
1 parent a116754 commit b12032b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions test/makezip.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
#!/bin/bash
set -euxo pipefail
gh() {
check_gh() {
# Check if `gh` command is available
if ! command -v gh > /dev/null; then
echo "The CLI utility 'gh' was not found"
if command -v gh >/dev/null 2>&1; then
echo "OK: GitHub CLI 'gh' found"
gh --version
return 0
else
echo "OK: CLI utility 'gh' found"
return 1
echo "ERROR: GitHub CLI 'gh' was not found"
echo "Please install it from https://cli.github.com/"
return 1
fi
}


getversion() {
new_tag="v$(grep version "$DIR"/../seqfu.nimble | cut -f 2 -d \")"
# check if gh()
if gh; then
if check_gh; then
new_tag=$(gh release list -L 1 | grep -o "v\d\+\.\d\+\.\d\+")
else
echo "Could not get remote release""
echo "Could not get remote release"
fi
}
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
Expand Down

0 comments on commit b12032b

Please sign in to comment.