diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/deploy-snapshot.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/deploy-snapshot.sh b/scripts/deploy-snapshot.sh index 5a8c846f..760e52ef 100755 --- a/scripts/deploy-snapshot.sh +++ b/scripts/deploy-snapshot.sh @@ -8,7 +8,7 @@ set -ex LATEST_TAG="latest" CURRENT_REV="$(git rev-parse --short HEAD)" -ASSET_DIRECTORY="${GITHUB_WORKSPACE}/app/outputs" +ASSET_DIRECTORY="${GITHUB_WORKSPACE:?}/app/outputs" function overwrite_local_tag() { git tag -f "${LATEST_TAG}" @@ -19,7 +19,7 @@ function overwrite_remote_tag() { } function has_release() { - gh release view "${LATEST_TAG}" + gh release view "${LATEST_TAG}" &>/dev/null echo "$?" } @@ -28,18 +28,18 @@ function delete_release() { } function create_rev_file() { - pushd "${ASSET_DIRECTORY}" + pushd "${ASSET_DIRECTORY}" || return echo "${CURRENT_REV}" | tee rev-hash.txt - popd + popd || return } function create_release() { local CHANGELOG_FILE CHANGELOG_FILE="$(mktemp)" echo "Latest release for APS from revision ${CURRENT_REV}" | tee "${CHANGELOG_FILE}" - pushd "${ASSET_DIRECTORY}" + pushd "${ASSET_DIRECTORY}" || return gh release create --title "Latest snapshot build" -F "${CHANGELOG_FILE}" "${LATEST_TAG}" ./* - popd + popd || return } overwrite_local_tag |