Add Check for Empty Release and Exit Early
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
f235e56fbb
commit
098adc46e6
|
@ -4,6 +4,11 @@ VERSION=$(cat VERSION)
|
|||
echo "Grabbing Release Data From:" "https://git.openprivacy.ca/api/v1/repos/$DRONE_REPO/releases/tags/$VERSION"
|
||||
RELEASEID=$(curl -s -X 'GET' "https://git.openprivacy.ca/api/v1/repos/$DRONE_REPO/releases/tags/$VERSION" -H 'accept: application/json' | jq '.id')
|
||||
echo $RELEASEID
|
||||
if [ "$RELEASEID" = "null" ]; then
|
||||
# $var is empty
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
URL="$PLUGIN_GOGS_URL/api/v1/repos/$DRONE_REPO/releases/$RELEASEID/assets?name=$1"
|
||||
FILE="@$1"
|
||||
|
|
Loading…
Reference in New Issue