Files
agendula/scripts/verify-release.sh
T
makiolaj 60a3814eb3 docs(releasing): the on-device checklist no longer fits the app
Step 1 was "launch from a clean state — the permission screen must appear",
which cannot happen on the path most people are now on. Since 1.0.0 the app
owns its store: with no OpenTasks or tasks.org installed, `autoMode()` resolves
to OWN, there is no permission to grant, and the app goes straight to the task
list. A gate that never appears is a checklist item that either gets ignored or
gets read as a failure.

Verified against this branch on a Pixel 10 (API 37): the releaseTest APK
installs, cold-starts in 549 ms with an empty crash buffer, and lands on the
task list with nothing granted.

The checklist now splits by what is installed, because the two paths verify
different things — and the provider path is where the new copy flow lives, so
it says to exercise it rather than leaving "the release's headline changes" to
stand in for it. A fresh install in OWN mode also has no lists at all, which
makes "create a task" impossible until you create one, so that is a step now.

The script's actions are unchanged: revoking both permission sets is still
right for the provider path, and revoking POST_NOTIFICATIONS still forces the
reminder onboarding either way.
2026-09-22 08:54:04 +02:00

65 lines
3.2 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Build the release-candidate APK and install it on a connected device for the
# mandatory pre-release on-device check (see docs/RELEASING.md).
#
# It builds the `releaseTest` variant: the same R8 shrinking + obfuscation and
# resource shrinking as the published `release` build, but debug-signed and
# with a `.releasetest` applicationId suffix so it installs alongside the
# production and debug apps. This is what surfaces release-only breakage (R8
# stripping) and first-run states (permission not yet granted) that the
# unminified debug build — or a device that already holds the permission —
# silently hides.
#
# Usage: scripts/verify-release.sh
set -euo pipefail
cd "$(dirname "$0")/.."
PKG="de.jeanlucmakiola.agendula.releasetest"
APK="app/build/outputs/apk/releaseTest/app-releaseTest.apk"
echo "==> Building release-candidate APK (releaseTest, R8 minified)…"
./gradlew :app:assembleReleaseTest
echo "==> Installing $PKG …"
adb install -r "$APK"
echo "==> Resetting to a first-run state (revoking tasks + notification permissions)…"
# Force the permission-not-granted state so the permission gate / onboarding is
# exercised every time — R8-only breakage and first-run crashes never show up in
# the unminified debug build, nor on a device that already holds the permission.
# Both tasks-provider permission sets are declared; revoke each so whichever the
# device's provider uses starts ungranted.
adb shell pm revoke "$PKG" org.dmfs.permission.READ_TASKS 2>/dev/null || true
adb shell pm revoke "$PKG" org.dmfs.permission.WRITE_TASKS 2>/dev/null || true
adb shell pm revoke "$PKG" org.tasks.permission.READ_TASKS 2>/dev/null || true
adb shell pm revoke "$PKG" org.tasks.permission.WRITE_TASKS 2>/dev/null || true
adb shell pm revoke "$PKG" android.permission.POST_NOTIFICATIONS 2>/dev/null || true
echo
echo "Installed and reset. Now verify ON THE DEVICE before releasing."
echo
echo "Which path you are on depends on what else is installed — since 1.0.0 the"
echo "app owns its store, so the default path grants nothing at all:"
echo
echo " No OpenTasks / tasks.org on the device (the default, and what a fresh"
echo " install looks like):"
echo " 1. Launch from a clean state — the task list must load straight away."
echo " There is no permission to grant in this mode, so no gate appears."
echo " 2. Create a list, then a task in it — a fresh install has neither."
echo " 3. Give the task a due reminder and confirm the notification fires."
echo
echo " With OpenTasks or tasks.org installed:"
echo " 1. Launch from a clean state — the permission gate must appear (no crash)."
echo " 2. Grant tasks access — that app's task list must load."
echo " 3. Settings -> Storage -> Copy tasks from ... — the confirm must name a"
echo " real count, and switching to \"On this device\" must then show them."
echo " 4. Create a task with a due reminder and confirm the notification fires."
echo
echo " Either way: exercise the release's headline changes end to end."
echo
echo "Watch for crashes with: adb logcat -b crash"
echo "Only merge the release branch to main once all of the above pass on a device"
echo "(the merge is what publishes the release — see docs/RELEASING.md)."