diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2022-11-25 01:20:13 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2022-11-25 01:20:13 +0530 |
commit | d25635500d2ba4d7760df46ab2432b6597c92600 (patch) | |
tree | 879825bf80a8d0ae32f81f068a916dd4b6bfecb1 /scripts | |
parent | f804a660e68d649ab0aa166603b8c0aec6e6a3fa (diff) |
chore(ci): misc changes to snapshot deployment
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/deploy-snapshot.sh | 18 | ||||
-rw-r--r-- | scripts/snapshot-changelog-template.txt | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/scripts/deploy-snapshot.sh b/scripts/deploy-snapshot.sh index f5e3f971..7bae493c 100755 --- a/scripts/deploy-snapshot.sh +++ b/scripts/deploy-snapshot.sh @@ -19,7 +19,7 @@ function overwrite_remote_tag() { } function has_release() { - gh release view "${LATEST_TAG}" &>/dev/null + gh release view "${LATEST_TAG}" echo "$?" } @@ -28,9 +28,9 @@ function delete_release() { } function create_rev_file() { - pushd "${ASSET_DIRECTORY}" || return + pushd "${ASSET_DIRECTORY}" || exit 1 echo "${CURRENT_REV}" | tee rev-hash.txt - popd || return + popd || exit 1 } function create_release() { @@ -38,19 +38,19 @@ function create_release() { CHANGELOG_FILE="$(mktemp)" cp scripts/snapshot-changelog-template.txt "${CHANGELOG_FILE}" sed -i "s/__SNAPSHOT_REV__/${CURRENT_REV}/" "${CHANGELOG_FILE}" - pushd "${ASSET_DIRECTORY}" || return + pushd "${ASSET_DIRECTORY}" || exit 1 gh release create --prerelease --title "Latest snapshot build" --notes-file "${CHANGELOG_FILE}" "${LATEST_TAG}" ./* - popd || return + popd || exit 1 } overwrite_local_tag -if [[ "$(has_release)" -eq 0 ]]; then - delete_release -fi - create_rev_file overwrite_remote_tag +if [[ "$(has_release)" -eq 0 ]]; then + delete_release +fi + create_release diff --git a/scripts/snapshot-changelog-template.txt b/scripts/snapshot-changelog-template.txt index e6641d15..8cb8fb2f 100644 --- a/scripts/snapshot-changelog-template.txt +++ b/scripts/snapshot-changelog-template.txt @@ -1,3 +1,3 @@ -Latest release for APS from revision __SNAPSHOT_REV__ +Snapshot build of APS from revision __SNAPSHOT_REV__ Consult the build types documentation [here](https://docs.passwordstore.app/docs/users/build-types) for the differences between free and nonFree builds. |