Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Remove version number from release binaries #91

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions ci/upload-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -euo pipefail
IFS=$'\n\t'

cd "$(cd "$(dirname "${0}")" && pwd)"/..

ref="${GITHUB_REF:?}"
tag="${ref#*/tags/}"

Expand All @@ -16,12 +18,18 @@ cd target/release
case "${OSTYPE}" in
linux* | darwin*)
strip "${package}"
asset="${package}-${tag}-${host}.tar.gz"
asset="${package}-${host}.tar.gz"
# TODO: remove this when release the next major version.
asset2="${package}-${tag}-${host}.tar.gz"
tar czf ../../"${asset}" "${package}"
tar czf ../../"${asset2}" "${package}"
;;
cygwin* | msys*)
asset="${package}-${tag}-${host}.zip"
asset="${package}-${host}.zip"
# TODO: remove this when release the next major version.
asset2="${package}-${tag}-${host}.zip"
7z a ../../"${asset}" "${package}".exe
7z a ../../"${asset2}" "${package}".exe
;;
*)
echo "unrecognized OSTYPE: ${OSTYPE}"
Expand All @@ -34,5 +42,5 @@ if [[ -z "${GITHUB_TOKEN:-}" ]]; then
echo "GITHUB_TOKEN not set, skipping deploy"
exit 1
else
gh release upload "${tag}" "${asset}" --clobber
gh release upload "${tag}" "${asset}" "${asset2}" --clobber
fi