Compare commits

..

No commits in common. "main" and "v7.14.16" have entirely different histories.

2 changed files with 30 additions and 6 deletions

View file

@ -134,7 +134,7 @@
</div>
<div id="apk-download-link" style="text-align:center;margin:14px 0 0;font-size:13px;">
<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;">
<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;">
<i class="fas fa-mobile-screen"></i> Download Android app (APK)
</a>
</div>

View file

@ -5,6 +5,7 @@
# 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
@ -12,6 +13,7 @@
# 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
@ -20,24 +22,25 @@
# (.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 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.
# updates. So --push is normally all you need; --gh is a leftover from
# the GitHub era and is not how releases are published here.
# ============================================================
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]"
echo " example: $0 6.1.1 --push"
echo "usage: $0 <version> [--push] [--gh]"
echo " example: $0 6.1.1 --push --gh"
exit 1
fi
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
@ -111,4 +114,25 @@ 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."