2020-05-11 23:08:22 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
# Downloads the release artifacts from CI for the current
|
|
|
|
# commit and then uploads them to the release with the version
|
|
|
|
# in package.json.
|
|
|
|
# You will need $GITHUB_TOKEN set.
|
|
|
|
|
|
|
|
main() {
|
|
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
source ./ci/lib.sh
|
|
|
|
|
|
|
|
download_artifact release-packages ./release-packages
|
2020-06-04 22:31:01 +02:00
|
|
|
local assets=(./release-packages/code-server*"$VERSION"*{.tar.gz,.zip,.deb,.rpm})
|
2020-05-11 23:08:22 +02:00
|
|
|
for i in "${!assets[@]}"; do
|
|
|
|
assets[$i]="--attach=${assets[$i]}"
|
|
|
|
done
|
2020-05-16 16:55:46 +02:00
|
|
|
EDITOR=true hub release edit --draft "${assets[@]}" "v$VERSION"
|
2020-05-11 23:08:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|