Skip to content

Commit b12032b

Browse files
committed
Add version to test.sh output /3 (compressor)
1 parent a116754 commit b12032b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/makezip.sh

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
#!/bin/bash
22
set -euxo pipefail
3-
gh() {
3+
check_gh() {
44
# Check if `gh` command is available
5-
if ! command -v gh > /dev/null; then
6-
echo "The CLI utility 'gh' was not found"
5+
if command -v gh >/dev/null 2>&1; then
6+
echo "OK: GitHub CLI 'gh' found"
7+
gh --version
78
return 0
89
else
9-
echo "OK: CLI utility 'gh' found"
10-
return 1
10+
echo "ERROR: GitHub CLI 'gh' was not found"
11+
echo "Please install it from https://cli.github.com/"
12+
return 1
1113
fi
1214
}
13-
1415

1516
getversion() {
1617
new_tag="v$(grep version "$DIR"/../seqfu.nimble | cut -f 2 -d \")"
1718
# check if gh()
18-
if gh; then
19+
if check_gh; then
1920
new_tag=$(gh release list -L 1 | grep -o "v\d\+\.\d\+\.\d\+")
2021
else
21-
echo "Could not get remote release""
22+
echo "Could not get remote release"
2223
fi
2324
}
2425
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

0 commit comments

Comments
 (0)