diff --git a/bb64/publish.sh b/bb64/publish.sh index a664520..5321f83 100755 --- a/bb64/publish.sh +++ b/bb64/publish.sh @@ -37,7 +37,10 @@ docker build \ --output "${OUTPUT}" \ "${SCRIPT_DIR}" -[ -f "${OUTPUT}/${PROJECT}" ] || die "Build failed." +if [ ! -f "${OUTPUT}/${PROJECT}" ]; then + echo "Build failed." >&2 + exit 1 +fi cp "${OUTPUT}/${PROJECT}" "${OUTPUT}/${PROJECT}.${ARCH_ALIAS}" cp "${OUTPUT}/${PROJECT}" "${OUTPUT}/${PROJECT}.${ARCH}" @@ -69,7 +72,10 @@ RELEASE_DATA=$(cat <&2 + exit 1 +fi RELEASE_ID=$(curl -s -X POST "$API_URL/releases" \ -H "Content-Type: application/json" \ @@ -96,7 +102,7 @@ for FILE in ${PROJECT}.${ARCH_ALIAS} ${PROJECT}.${ARCH} install.sh; do curl -s -X POST "$API_URL/releases/$RELEASE_ID/assets?name=$FILE" \ -H "Content-Type: $ctype" \ - -H "Authorization: token $TOKEN" \ + -H "Authorization: token $DOCKER_PUSH_TOKEN" \ --data-binary @"$filetoupload" echo "Uploaded $FILE to release $TAG as $ctype." done @@ -105,7 +111,7 @@ echo "Published bb64 version $v to $REPO_URL (tag $TAG) with binaries for $ARCH_ #-------------------------------------------------------------------------------- -heading "Publishing ${PROJECT} as tool to getpkg.xyz" +echo "Publishing ${PROJECT} as tool to getpkg.xyz" # Create tool directory structure TOOLDIR="${OUTPUT}/tool"