ci/release: More fixes

This commit is contained in:
Anmol Sethi 2022-11-14 05:50:17 -08:00
parent a025393b36
commit 0cf7f7ee9c
5 changed files with 3 additions and 54 deletions

View file

@ -14,10 +14,6 @@ it depends on from ../sub/lib.
- ./release.sh is the top level script to generate a new release. - ./release.sh is the top level script to generate a new release.
Run with --help for usage. Run with --help for usage.
### upload_assets.sh
- Called by ./release.sh to upload the assets for the release in $VERSION
## build.sh ## build.sh
- ./build.sh builds the release archives for each platform into ./build/<VERSION>/*.tar.gz - ./build.sh builds the release archives for each platform into ./build/<VERSION>/*.tar.gz

View file

@ -344,7 +344,7 @@ fetch_release_info() {
return 0 return 0
fi fi
log "fetching info on version $VERSION" log "fetching info on $VERSION version of $REPO"
RELEASE_INFO=$(mktemp -d)/release-info.json RELEASE_INFO=$(mktemp -d)/release-info.json
if [ "$VERSION" = latest ]; then if [ "$VERSION" = latest ]; then
release_info_url="https://api.github.com/repos/$REPO/releases/$VERSION" release_info_url="https://api.github.com/repos/$REPO/releases/$VERSION"

View file

@ -2,4 +2,4 @@
set -eu set -eu
cd -- "$(dirname "$0")/../.." cd -- "$(dirname "$0")/../.."
./ci/sub/bin/release.sh "$@" ./ci/sub/release/release.sh "$@"

View file

@ -1,47 +0,0 @@
#!/bin/sh
set -eu
cd -- "$(dirname "$0")/../.."
. ./ci/sub/lib.sh
help() {
cat <<EOF
usage: $0 <version>
Uploads the assets for release <version> to GitHub.
For example, if <version> is v0.0.99 then it uploads files matching
./ci/release/build/v0.0.99/*.tar.gz to the GitHub release v0.0.99.
Example:
$0 v0.0.99
EOF
}
main() {
while :; do
flag_parse "$@"
case "$FLAG" in
h|help)
help
return 0
;;
'')
shift "$FLAGSHIFT"
break
;;
*)
flag_errusage "unrecognized flag $FLAGRAW"
;;
esac
done
if [ $# -ne 1 ]; then
flag_errusage "first argument must be release version like v0.0.99"
fi
VERSION="$1"
shift
sh_c gh release upload --clobber "$VERSION" "./ci/release/build/$VERSION"/*.tar.gz
}
main "$@"

2
ci/sub

@ -1 +1 @@
Subproject commit c91c28cbcaa8935c4054d7d5f0c28348caed5a2e Subproject commit 231dec9096304f1a033fd2ef35228d4c6e0744b3