Error if GitHub release could not be found
If we want to auto-upload the artifacts to GitHub, then we now error if
there could be no release found.
@@ -22,6 +22,10 @@ if TAG=$(git describe --exact-match --tags 2>/dev/null); then
else
UPLOAD_URL=$(curl -sfL https://api.github.com/repos/cri-o/cri-o/releases |
jq -r ".[] | select(.tag_name == \"$TAG\") | .upload_url")
+ if [[ -z $UPLOAD_URL ]]; then
+ echo "Unable to find GitHub release for tag $TAG"
+ exit 1
+ fi
UPLOAD_URL=${UPLOAD_URL%"{?name,label}"}
FILE=build/bundle/crio-$TAG.tar.gz
curl -f \
