diff --git a/SHA256SUMS b/SHA256SUMS index 0825257..1c22844 100644 --- a/SHA256SUMS +++ b/SHA256SUMS @@ -1,2 +1,2 @@ 05e4977d541b2ef07c757acca912b7b58b379fb425eceb3a1f53c829a78a4aa4 docker2aci.sh -bb37ce911951a311e6ab4c27ddbc310d0f609556371be46a47656e70165034cf golang.sh +b97c0e9a9ec420d1c29a4236ff949cd01704896961f3d114c1bfb450dde52647 golang.sh diff --git a/golang.sh b/golang.sh index 5766e2d..4a28197 100755 --- a/golang.sh +++ b/golang.sh @@ -23,6 +23,7 @@ DEPLOYMENT_TAG=${DEPLOYMENT_TAG:-${VERSION}} PACKAGES=${PACKAGES:-$(echo ${godir} | cut -d '/' -f 1-3)} BUILD_DIR=${BUILD_DIR:-.build} DRAFT=${DRAFT:-true} +FORCE_SKIP_UPLOAD=${FORCE_SKIP_UPLOAD:-false} go version @@ -67,19 +68,27 @@ sha256sum * >>SHA256SUMS grep -v 'SHA256SUMS' SHA256SUMS >SHA256SUMS.tmp mv SHA256SUMS.tmp SHA256SUMS +echo -e "\n\n=== Recorded checksums ===" +cat SHA256SUMS + +if [[ ${FORCE_SKIP_UPLOAD} == "true" ]]; then + echo "Upload is skipped, stopping build now." + exit 0 +fi + step "Publish builds to Github" -if (test "${VERSION}" == "ghpublish__notags"); then +if [[ ${VERSION} == "ghpublish__notags" ]]; then echo "No tag present, stopping build now." exit 0 fi if [ -z "${GITHUB_TOKEN}" ]; then - echo "Please set \$GITHUB_TOKEN environment variable" + echo 'Please set $GITHUB_TOKEN environment variable' exit 1 fi -if [[ "${DRAFT}" == "true" ]]; then +if [[ ${DRAFT} == "true" ]]; then step "Create a drafted release" github-release release --user ${GHUSER} --repo ${REPO} --tag ${DEPLOYMENT_TAG} --name ${DEPLOYMENT_TAG} --draft || true else @@ -93,7 +102,4 @@ for file in *; do github-release upload --user ${GHUSER} --repo ${REPO} --tag ${DEPLOYMENT_TAG} --name ${file} --file ${file} done -echo -e "\n\n=== Recorded checksums ===" -cat SHA256SUMS - cd -