Remove the --gh flag from release.sh
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 2m46s
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 2m46s
release.sh --gh ran `gh release create` against GitHub. This project publishes releases to Forgejo, and CI does it automatically on a v* tag push (.forgejo/workflows/android-apk.yml attaches the signed APK for Obtainium). The flag could not do anything useful here, and having it in the usage text implied a manual publish step that does not exist. Drops the flag, its DO_RELEASE branch, and the usage/header references. --push remains the only option. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
3fb4c10f2b
commit
f556d50a09
1 changed files with 5 additions and 29 deletions
|
|
@ -5,7 +5,6 @@
|
|||
# Usage:
|
||||
# scripts/release.sh 6.1.1 # bump to 6.1.1
|
||||
# scripts/release.sh 6.1.1 --push # also git push + tag push
|
||||
# scripts/release.sh 6.2.0 --push --gh # also create GitHub release
|
||||
#
|
||||
# What it does:
|
||||
# 1. Updates version in root package.json
|
||||
|
|
@ -13,7 +12,6 @@
|
|||
# 3. Updates versionName + bumps versionCode in Android build.gradle
|
||||
# 4. Commits the version bump
|
||||
# 5. (optional) git push + push the new tag
|
||||
# 6. (optional) create a GitHub release via gh CLI
|
||||
#
|
||||
# It does NOT:
|
||||
# - Build the Docker image (run `docker compose build`/`up -d` yourself
|
||||
|
|
@ -22,25 +20,24 @@
|
|||
# (.forgejo/workflows/android-apk.yml): any branch push builds a signed
|
||||
# APK as a 30-day workflow artifact, and a v* tag push additionally
|
||||
# attaches it to a Forgejo release, which is what Obtainium tracks for
|
||||
# updates. So --push is normally all you need; --gh is a leftover from
|
||||
# the GitHub era and is not how releases are published here.
|
||||
# updates. So --push is all you need to ship a build.
|
||||
# - Publish the release itself. CI does that on the tag push; there is no
|
||||
# manual publish step to run.
|
||||
# ============================================================
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
VERSION="${1:-}"
|
||||
PUSH=false
|
||||
DO_RELEASE=false
|
||||
for arg in "${@:2}"; do
|
||||
case "$arg" in
|
||||
--push) PUSH=true ;;
|
||||
--gh) DO_RELEASE=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
echo "usage: $0 <version> [--push] [--gh]"
|
||||
echo " example: $0 6.1.1 --push --gh"
|
||||
echo "usage: $0 <version> [--push]"
|
||||
echo " example: $0 6.1.1 --push"
|
||||
exit 1
|
||||
fi
|
||||
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
|
|
@ -114,25 +111,4 @@ if $PUSH; then
|
|||
echo " pushed to $REMOTE"
|
||||
fi
|
||||
|
||||
if $DO_RELEASE; then
|
||||
if ! command -v gh >/dev/null; then
|
||||
echo "WARN: gh CLI not installed, skipping GitHub release creation" >&2
|
||||
else
|
||||
APK="mobile/android/app/build/outputs/apk/release/app-release.apk"
|
||||
if [[ -f "$APK" ]]; then
|
||||
gh release create "v${VERSION}" "$APK" \
|
||||
--title "PedScribe ${VERSION}" \
|
||||
--notes "Release ${VERSION}" \
|
||||
--latest
|
||||
echo " created GitHub release with APK"
|
||||
else
|
||||
gh release create "v${VERSION}" \
|
||||
--title "PedScribe ${VERSION}" \
|
||||
--notes "Release ${VERSION}" \
|
||||
--latest
|
||||
echo " created GitHub release (no APK attached — run gradle first then gh release upload)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "==> Done. v$VERSION."
|
||||
|
|
|
|||
Loading…
Reference in a new issue