Skip to content

Commit 7f9ff79

Browse files
committed
future proof check_ci_status.sh
1 parent ad58df0 commit 7f9ff79

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
#/bin/bash
2+
set -o errexit
3+
set -o nounset
4+
set -o pipefail
5+
set -o xtrace
26

3-
[ $(curl -s https://api.github.com/repos/testcontainers/testcontainers-java/commits/$1/status | jq -r '.state') == 'success' ]
7+
if [ -z $1 ] ; then
8+
echo "First parameter (commit SHA) is required!" && exit 1;
9+
fi
10+
11+
STATUS=$(curl -s https://api.github.com/repos/testcontainers/testcontainers-java/commits/$1/status | jq -r '.state')
12+
13+
[ "$STATUS" == 'success' ]

0 commit comments

Comments
 (0)