Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f556d50a09 | ||
|
|
3fb4c10f2b |
2 changed files with 6 additions and 30 deletions
|
|
@ -134,7 +134,7 @@
|
|||
</div>
|
||||
|
||||
<div id="apk-download-link" style="text-align:center;margin:14px 0 0;font-size:13px;">
|
||||
<a href="https://github.com/ifedan-ed/pediatric-ai-scribe-v3/releases/latest" target="_blank" rel="noopener" style="color:#2563eb;text-decoration:none;font-weight:500;">
|
||||
<a href="https://git.danvics.com/danvics/pediatric-ai-scribe-v3/releases/latest" target="_blank" rel="noopener" style="color:#2563eb;text-decoration:none;font-weight:500;">
|
||||
<i class="fas fa-mobile-screen"></i> Download Android app (APK)
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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