ci(release): attach per-version notes from PREVIOUS_HISTORY.md to releases
Per-version user-facing changelog moved out of the README table into PREVIOUS_HISTORY.md (newest-first sections, Development Plan §11.1). On tag push the workflow now harvests the matching section via scripts/ci/release-notes.py and uses it as the release description, uploading an Incido-<version>-changes.md beside the APKs; a missing section falls back to the plain default description. CONTRIBUTING §5 documents the new release-notes maintenance step.
This commit is contained in:
1 parent
576080c8b5
commit
7b6187f99a
5 files changed
+357
-3
No files matched your search
@@ -109,6 +109,20 @@ jobs:
|
|||||||
|
|
||||||
echo "Tag: $TAG Version: $VERSION"
|
echo "Tag: $TAG Version: $VERSION"
|
||||||
|
|
||||||
|
# User-facing release notes: harvest this version's section from
|
||||||
|
# PREVIOUS_HISTORY.md (maintained per Development Plan §11.1).
|
||||||
|
# Used as the release description and uploaded beside the APKs.
|
||||||
|
NOTES_FILE="/tmp/Incido-$VERSION-changes.md"
|
||||||
|
if python3 scripts/ci/release-notes.py "$VERSION" --out "$NOTES_FILE"; then
|
||||||
|
HAS_NOTES=1
|
||||||
|
echo "--- Release notes preview (v$VERSION) ---"
|
||||||
|
head -12 "$NOTES_FILE"
|
||||||
|
echo "---"
|
||||||
|
else
|
||||||
|
HAS_NOTES=0
|
||||||
|
echo "No PREVIOUS_HISTORY.md section for v$VERSION - falling back to the default description."
|
||||||
|
fi
|
||||||
|
|
||||||
echo "--- Check for existing release ---"
|
echo "--- Check for existing release ---"
|
||||||
RELEASE_ID=$(curl -s "$API/releases/tags/$TAG" \
|
RELEASE_ID=$(curl -s "$API/releases/tags/$TAG" \
|
||||||
-H "Authorization: token $GH_TOKEN" \
|
-H "Authorization: token $GH_TOKEN" \
|
||||||
@@ -116,7 +130,7 @@ jobs:
|
|||||||
|
|
||||||
if [ -z "$RELEASE_ID" ]; then
|
if [ -z "$RELEASE_ID" ]; then
|
||||||
echo "--- Create release ---"
|
echo "--- Create release ---"
|
||||||
python3 -c "import sys,json; sys.stdout.write(json.dumps({'tag_name': '$TAG', 'name': '$TAG', 'body': 'Release $TAG', 'draft': False, 'prerelease': False}))" \
|
REL_TAG="$TAG" REL_NOTES_FILE="$NOTES_FILE" python3 -c "import json,os; nf=os.environ.get('REL_NOTES_FILE',''); body=(open(nf,encoding='utf-8').read() if nf and os.path.exists(nf) else 'Release '+os.environ['REL_TAG']); print(json.dumps({'tag_name':os.environ['REL_TAG'],'name':os.environ['REL_TAG'],'body':body,'draft':False,'prerelease':False}))" \
|
||||||
> /tmp/release_payload.json
|
> /tmp/release_payload.json
|
||||||
RELEASE_ID=$(curl -s -X POST "$API/releases" \
|
RELEASE_ID=$(curl -s -X POST "$API/releases" \
|
||||||
-H "Authorization: token $GH_TOKEN" \
|
-H "Authorization: token $GH_TOKEN" \
|
||||||
@@ -125,6 +139,17 @@ jobs:
|
|||||||
| python3 -c "import sys,json; print(json.load(sys.stdin).get('id','') or '')")
|
| python3 -c "import sys,json; print(json.load(sys.stdin).get('id','') or '')")
|
||||||
else
|
else
|
||||||
echo "--- Reusing existing release $RELEASE_ID ---"
|
echo "--- Reusing existing release $RELEASE_ID ---"
|
||||||
|
# Refresh the description even on a rerun, so backfills and
|
||||||
|
# retried asset uploads always match PREVIOUS_HISTORY.md.
|
||||||
|
if [ "$HAS_NOTES" = "1" ]; then
|
||||||
|
echo "--- Patching release description from PREVIOUS_HISTORY.md ---"
|
||||||
|
REL_NOTES_FILE="$NOTES_FILE" python3 -c "import json,os; print(json.dumps({'body': open(os.environ['REL_NOTES_FILE'],encoding='utf-8').read()}))" \
|
||||||
|
> /tmp/body_patch.json
|
||||||
|
curl -s -X PATCH "$API/releases/$RELEASE_ID" \
|
||||||
|
-H "Authorization: token $GH_TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d @/tmp/body_patch.json > /dev/null
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Release ID: $RELEASE_ID"
|
echo "Release ID: $RELEASE_ID"
|
||||||
@@ -180,5 +205,16 @@ jobs:
|
|||||||
upload_asset "$APK" "$APK_PATH" || exit 1
|
upload_asset "$APK" "$APK_PATH" || exit 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Ship the changelog beside the binaries: people skimming the
|
||||||
|
# downloads get the notes for exactly this version as a file,
|
||||||
|
# generated from PREVIOUS_HISTORY.md at the top of this run.
|
||||||
|
if [ "$HAS_NOTES" = "1" ]; then
|
||||||
|
NOTES_ASSET="Incido-$VERSION-changes.md"
|
||||||
|
echo "--- Deleting stale asset for $NOTES_ASSET ---"
|
||||||
|
python3 /tmp/delete_asset.py "$API" "$RELEASE_ID" "$NOTES_ASSET" "$GH_TOKEN"
|
||||||
|
cp "$NOTES_FILE" "/tmp/$NOTES_ASSET"
|
||||||
|
upload_asset "$NOTES_ASSET" "/tmp/$NOTES_ASSET" || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "--- Final release state ---"
|
echo "--- Final release state ---"
|
||||||
curl -s "$API/releases/$RELEASE_ID" -H "Authorization: token $GH_TOKEN" | python3 -c "import sys,json; d=json.load(sys.stdin); print('Release ' + d['tag_name'] + ' has ' + str(len(d['assets'])) + ' assets')"
|
curl -s "$API/releases/$RELEASE_ID" -H "Authorization: token $GH_TOKEN" | python3 -c "import sys,json; d=json.load(sys.stdin); print('Release ' + d['tag_name'] + ' has ' + str(len(d['assets'])) + ' assets')"
|
||||||
+4
-2
@@ -63,8 +63,10 @@ adb install -r app/build/outputs/apk/debug/app-debug.apk
|
|||||||
or your feature's manual verification steps.
|
or your feature's manual verification steps.
|
||||||
|
|
||||||
### 5. Commit
|
### 5. Commit
|
||||||
We use [Conventional Commits](https://www.conventionalcommits.org/) so
|
We use [Conventional Commits](https://www.conventionalcommits.org/).
|
||||||
the changelog can be generated automatically later:
|
Per-version user-facing notes live in `PREVIOUS_HISTORY.md`
|
||||||
|
(Development Plan §11.1) — the release CI attaches the matching section
|
||||||
|
to each Gitea release automatically:
|
||||||
|
|
||||||
| Type | Use for |
|
| Type | Use for |
|
||||||
|------|---------|
|
|------|---------|
|
||||||
|
|||||||
@@ -0,0 +1,174 @@
|
|||||||
|
# Incido — Previous Release History
|
||||||
|
|
||||||
|
Reference archive of Incido's user-facing release history (formerly the
|
||||||
|
README changelog table).
|
||||||
|
|
||||||
|
Current downloads ship **with their own notes**: every release on the
|
||||||
|
[Releases page](https://git.trevena.info/nick/incido/releases) carries its
|
||||||
|
version's changelog — rendered in the release description and also
|
||||||
|
attached beside the APKs as `Incido-<version>-changes.md`. The CI generates
|
||||||
|
both from the matching section below via `scripts/ci/release-notes.py`
|
||||||
|
at tag-build time.
|
||||||
|
|
||||||
|
**Adding a release:** append a `## v<VERSION> — <DATE>` section at the
|
||||||
|
top of this file (see Development Plan §11.1). Newest first; never delete
|
||||||
|
or reorder older sections — the CI must find a section for whatever tag it
|
||||||
|
builds, and hotfix retags can target any version. If a tag has no section,
|
||||||
|
the release falls back to a plain "Release <tag>" description.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## v0.3.8.0 — 2026-09-16
|
||||||
|
|
||||||
|
- **Task lists + shopping lists (Development Plan §6.1).** New checklist button in the editor's bottom action row (next to the `#` tag button) converts any note into an editable task list — real checkboxes, add / remove item rows; tap the button again to return to plain text (`NoteType`, additive `typeKey` column, auto-migrated). New shopping-basket button works the same way but gives every row a tap-to-pick **quantity (1–9) dropdown** and a supermarket-style price field where the number pad types cents — enter `199` and it counts as **$1.99** in the maths (the price box keeps exactly the digits you typed, so cursor placement can never scramble them, while the total bar speaks real dollars). An always-visible running total sits above the list, adding quantity × price for everything checked (= in the basket). The three values are strictly separate fields saved with an explicit end-of-line marker (`- [x] Eggs {q12 p2.40}`), so numbers inside a product name (like "Battery AA 3") can never leak into the money maths; hand-typed classic lines (`Milk 3.50`, `Eggs 12 x 2.40`) are still recognised when converting older notes. Lists persist as GitHub-flavoured `- [ ]` lines, so search, encryption, backups (new defaulted `noteType` field — old files still import), and card "N open · M done" summaries keep working; shopping cards show a basket icon.
|
||||||
|
- **Add-tag sheet suggestions fixed** — the nested-collect autocomplete pipeline never resumed past the first keystroke, so only "+ Create…" ever showed; rebuilt on `flatMapLatest`, existing tags now list immediately when the sheet opens and filter live per keystroke.
|
||||||
|
|
||||||
|
## v0.3.7.1 — 2026-08-30
|
||||||
|
|
||||||
|
- **UI polish.** Add/Edit screen tidied up: camera, attach-file, and add-tag moved out of the top bar into a bottom action row, so the title and remaining buttons always fit. Fixed a false "couldn't load image" error that flashed whenever you opened a saved image. Search auto-focuses on open and shows a clear (✕) button. Long tag lists in the drawer now scroll instead of being cut off. The add-tag sheet opens with the keyboard ready. New flat app icon (same shield + pen-nib motif, cleaner squircle design).
|
||||||
|
|
||||||
|
## v0.3.7.0 — 2026-08-20
|
||||||
|
|
||||||
|
- **Trash / soft delete.** Add a Trash drawer item; deleting a note soft-deletes it, hiding it from every active view and ordinary search. Trash-only cards expose Restore and permanent Delete.
|
||||||
|
|
||||||
|
## v0.3.6.3 — 2026-08-20
|
||||||
|
|
||||||
|
- **Missing-keystore failure is now actionable on a fresh clone.** `./gradlew assembleRelease` now fails at configuration time with a clear `GradleException` quoting the exact `keytool` command from `keystore/README.md` if `keystore/release.jks` is missing, instead of dying much later inside `packageRelease` with the cryptic `SigningConfig "release" is missing required property "storeFile"`. CI is unchanged: `.gitea/workflows/release.yml` already mints the dev keystore on the runner before `assembleRelease`.
|
||||||
|
|
||||||
|
## v0.3.6.2 — 2026-08-19
|
||||||
|
|
||||||
|
- **CI / release-pipeline tag.** — re-tag of v0.3.6.1 used to exercise the Gitea Actions release workflow (keystore minted on the release runner; debug + release APKs attached to the Gitea release). No app changes.
|
||||||
|
|
||||||
|
## v0.3.6.1 — 2026-08-19
|
||||||
|
|
||||||
|
- **Editor top-bar title is now left-aligned.** On the New / Edit screen the title ("New" / "Edit") now sits next to the back arrow, away from the six action icons that crowd the right edge — it was previously centred via `CenterAlignedTopAppBar` and visually pushed toward the action cluster.
|
||||||
|
- **Colour picker is now symmetric between the title bar and the note top.** The picker is flanked by 12dp gaps above and below (was 4dp top + 4dp bottom) so the visual distance to the title bar matches the distance to the `OutlinedTextField`'s top edge, instead of being dwarfed by the field's intrinsic top inset.
|
||||||
|
|
||||||
|
## v0.3.6.0 — 2026-08-19
|
||||||
|
|
||||||
|
- **Share webpages to Incido.** Sharing a page from your browser (Share → Incido) now creates a note with the page title on the first line and the URL below — fully offline (the title comes from the browser's share data, Incido never touches the network).
|
||||||
|
- **Export encryption key.** Settings → Security gains "Export encryption key" — saves the AES-256 key that protects your encrypted notes to a passphrase-protected `.inckey` file for device migrations.
|
||||||
|
- **Import encryption key** restores that key on a fresh install, with a clear warning before the current key is replaced.
|
||||||
|
|
||||||
|
## v0.3.5.1 — 2026-08-17
|
||||||
|
|
||||||
|
- **"Encrypted" badge now appears the moment you flip the switch.** A race in `EncryptionVerifier.checkNow()` could silently drop the post-migration verification, leaving cards without the badge until a second toggle; replaced with a serializing Mutex so every check runs in invocation order.
|
||||||
|
- **"Encrypted" indicator is now a single lock icon next to the date** — consistent position on every card instead of a centred "lock + label" group at the bottom.
|
||||||
|
|
||||||
|
## v0.3.5.0 — 2026-08-17
|
||||||
|
|
||||||
|
- **Real at-rest encryption.** Note text and attachment bytes are now AES-256-GCM encrypted in place the moment you toggle "Encrypt notes at rest" — no restart required; keyed by the Keystore-wrapped 32-byte key.
|
||||||
|
- **Verified "Encrypted" badge.** Every encrypted note is trial-decrypted on app open and after each migration; only verified notes get the lock badge.
|
||||||
|
- **Block screenshots (default ON).** New toggle in Settings → Security prevents screenshots, screen recording, and app-switcher previews while Incido is open.
|
||||||
|
|
||||||
|
## v0.3.4.0 — 2026-08-17
|
||||||
|
|
||||||
|
- **Attachment indicator on note cards.** — a paperclip icon now appears on the right edge of every card that carries an attachment.
|
||||||
|
- **Light-theme readability over image thumbnails.** — cards with a dark photo background now force light text/icon colours over the image so notes stay readable in Light mode.
|
||||||
|
- **Auto-Lock "Immediately" no longer locks during file pickers.** — attaching a file, taking a photo, viewing an attachment, or exporting/importing a backup no longer destroys your in-progress note.
|
||||||
|
|
||||||
|
## v0.3.3.8 — 2026-08-17
|
||||||
|
|
||||||
|
- **Designed Incido artwork is now the app icon.** The glass shield + fountain-pen nib replaces the placeholder glyph on the home screen, app drawer, and adaptive-icon layers.
|
||||||
|
|
||||||
|
## v0.3.3.7 — 2026-08-17
|
||||||
|
|
||||||
|
- **Biometric auto-launch.** When Biometric is your active lock method, the fingerprint / face reader now opens automatically when the lock screen appears — no extra tap on "Authenticate" needed.
|
||||||
|
|
||||||
|
## v0.3.3.6 — 2026-08-17
|
||||||
|
|
||||||
|
- **Card height tuned for real devices.** The fixed card height from v0.3.3.5 proved too tall on real devices; reduced by ~15% (now 143.dp).
|
||||||
|
|
||||||
|
## v0.3.3.5 — 2026-08-17
|
||||||
|
|
||||||
|
- **Fixed card height.** All note cards now have a single fixed height (168.dp), so untagged notes no longer look shorter than tagged ones; timestamp pinned to the bottom via a weighted spacer; hashtag row still hidden when empty; left colour stripe spans the full card height.
|
||||||
|
|
||||||
|
## v0.3.3.4 — 2026-08-17
|
||||||
|
|
||||||
|
- **Favourite star no longer overlaps the overflow button.** Star is now anchored to the card's bottom-right corner (same column as the top-right ⋮), so the two controls no longer collide.
|
||||||
|
|
||||||
|
## v0.3.3.3 — 2026-08-17
|
||||||
|
|
||||||
|
- **Importing an encrypted backup no longer crashes.** The passphrase was being wiped between the preview step and the confirm dialog's Import button; now retained across the confirmation step, with proper try/catch around preview/import so failures surface a snackbar ("Import failed. Check the file and passphrase." / "Could not read backup file.") instead of crashing.
|
||||||
|
|
||||||
|
## v0.3.3.2 — 2026-08-17
|
||||||
|
|
||||||
|
- **White-on-white lock screen in dark mode fixed.** `PinEntryScreen` is now wrapped in a themed Surface so it always paints its own theme-aware background.
|
||||||
|
- **Biometric unlock hang fixed.** Authentication is now fully asynchronous (BiometricPrompt callbacks run on the main executor) instead of busy-waiting on the main thread. Device-credential fallback preserved.
|
||||||
|
|
||||||
|
## v0.3.3.1 — 2026-08-17
|
||||||
|
|
||||||
|
- **"Encrypt notes at rest" toggle now correctly greyed out.** Until Security is on and you've chosen either PIN or Biometric — with a subtitle explaining the requirement.
|
||||||
|
- **"Enable Security" no longer requires a PIN first.** The master switch just flips on; PIN / Biometric / Encrypt sub-toggles were already gated.
|
||||||
|
- **Importing an encrypted backup now opens a dedicated passphrase dialog.** (single field, no policy check) — wrong passphrase surfaces "Incorrect passphrase." via snackbar.
|
||||||
|
|
||||||
|
## v0.3.3.0 — 2026-08-17
|
||||||
|
|
||||||
|
- **Lock mode as a single choice.** Security now exposes two mutually-exclusive toggles (PIN and Biometric) — either alone is enough to lock; Biometric no longer requires PIN first. New "Reset PIN" row appears when PIN is active; lock screen shows only the biometric button when no Incido PIN is set.
|
||||||
|
- **Encrypted-import passphrase prompt.** Selecting an encrypted backup opens the passphrase dialog first and surfaces "Incorrect passphrase." on mismatch.
|
||||||
|
- **Press-and-hold note card menu.** The inline delete button is gone; long-press a card (or tap the ⋮ button) to open a DropdownMenu with Delete — ready for future actions like Share.
|
||||||
|
|
||||||
|
## v0.3.2.0 — 2026-08-15
|
||||||
|
|
||||||
|
- **New Settings screen.** (Untagged → Settings in the nav drawer) with Appearance, Security, Backup & Restore, and About sections.
|
||||||
|
- **At-rest encryption.** ObjectBox store is opened with a 32-byte AES-256 key wrapped by the Android Keystore; toggling the switch generates / deletes the key and surfaces a "Re-encrypting notes…" dialog.
|
||||||
|
- **PIN lock + biometric.** 4–6 digit PIN (PBKDF2-hashed, 100k iters, constant-time compare) with optional fingerprint / face unlock; cold launch + auto-lock timeout gate.
|
||||||
|
- **Backup / Import / Export.** JSON codec with Base64 attachment bytes; encrypted variant uses AES-256-GCM + PBKDF2(passphrase, 200k iters) with a Generate button + Copy to clipboard. Passphrase policy: 12–32 chars, ≥1 digit, ≥1 special.
|
||||||
|
- **Release notes dialog.** — tap the version number on the About card. Adds `USE_BIOMETRIC` + `USE_FINGERPRINT` permissions (still no INTERNET).
|
||||||
|
|
||||||
|
## v0.3.1.2 — 2026-08-15
|
||||||
|
|
||||||
|
- **Three v0.3.1.1 issues fixed.** **card thumbnails are actually visible now** — the v0.3.1.1 layout had the thumbnail Image as a sibling of the Card, so the Card's opaque `containerColor` was drawn on top and the image was completely hidden; the architecture is restructured so the Image + dark scrim live INSIDE the Card, and `containerColor = Color.Transparent` when a thumbnail is present (plain notes still get the existing tinted/surface background).
|
||||||
|
- **Camera photos honour EXIF orientation** — `NoteRepositoryImpl.normalizeImageOrientation(bytes)` runs at storage time inside `addAttachment` (guarded `if (mimeType.startsWith("image/"))`); reads EXIF `Orientation`, rotates the bitmap, re-encodes as JPEG quality 92, and stores the corrected bytes so every render path (editor thumbnail, card thumbnail, full-screen viewer) sees the photo the right way up.
|
||||||
|
- **Non-image attachments open in the system viewer** — `AttachmentThumbnail.onClick` now branches on `isImage`: image taps still go to the in-app full-screen viewer; non-image taps write the bytes to a `cacheDir` temp file, get a `FileProvider` URI, and launch `Intent.ACTION_VIEW` with `FLAG_GRANT_READ_URI_PERMISSION` (the previous unconditional viewer path silently failed for PDFs/MP3s/etc. with a stuck "Loading…"). `file_paths.xml` already exposes `cacheDir` via `<cache-path>`, so no manifest change was needed. Attaching arbitrary file types from the paperclip icon was already shipped in v0.3.1.1 (the `*/*` intent filters) — no code change here, just called out so it's clear what was already in place.
|
||||||
|
|
||||||
|
## v0.3.1.1 — 2026-08-15
|
||||||
|
|
||||||
|
- **Five v0.3.1.0 issues fixed.** Persisted image attachments now render a thumbnail in the editor strip (previously fell through to the file-type placeholder because bytes weren't loaded) — `AttachmentThumbnail` lazy-loads bytes from the DB via `produceState` + `repository.getAttachmentBytes()`. Card thumbnails are more visible — alpha bumped 0.45 → 0.70 and the dark scrim dropped 0.18 → 0.08; also `clipToBounds()` so the image can't bleed past the card's rounded corners. Share-into from webpages now opens a fresh editor — `MainActivity.handleShareIntent()` stashes the share text synchronously before launching the async image-byte I/O, so the Compose tree's `LaunchedEffect(Unit)` always finds a payload on first composition. Share menu now offers Incido for any file type (PDF, MP3, video, archives) — added `<data android:mimeType="*/*" />` to both `ACTION_SEND` and `ACTION_SEND_MULTIPLE` intent filters. Editor top-bar title shortened to "Edit" / "New" so it fits on one line with the new icon row.
|
||||||
|
|
||||||
|
## v0.3.1.0 — 2026-08-15
|
||||||
|
|
||||||
|
- **Context-aware search.** — on the Favorites and Untagged pages, the search icon is now visible and a typed query intersects with the active filter (search only favourites on Favorites, only untagged notes on Untagged). On Home, search spans everything.
|
||||||
|
- **Photo / File attachments.** — the editor now has Camera (camera icon) and Attach File (paperclip icon) buttons. Photos are captured via `MediaStore.ACTION_IMAGE_CAPTURE` (with a transient `FileProvider` outbox; bytes live in the database, the temp file is deleted) and files via `ACTION_OPEN_DOCUMENT`. Attachments are stored as `ByteArray` columns inside ObjectBox — no filesystem paths to manage. Each note's attachments show up as a thumbnail strip in the editor with a ✕ in the top-right corner to remove. Tapping a thumbnail opens a full-screen viewer with pinch-to-zoom + pan (`Modifier.transformable`) and a close button.
|
||||||
|
- **Card thumbnails.** — notes with image attachments show the first image as a (alpha-blended, scrimmed) background on the list card.
|
||||||
|
- **Share-into.** — the app accepts `ACTION_SEND` (text + image) and `ACTION_SEND_MULTIPLE` (multiple images) from other apps. Inbound bytes are copied into a process-singleton `SharedIntentBuffer` and pre-filled into a new-note editor. Adds the `CAMERA` permission — still no `INTERNET`, still fully offline.
|
||||||
|
|
||||||
|
## v0.3.0.5 — 2026-08-15
|
||||||
|
|
||||||
|
- **Hashtag reconciliation is now a single transaction.** `NoteEditorViewModel.save()` still did upsert + per-tag `addHashtag` in three separate writes, so the drawer's `hashtagUsageSnapshot()` could read a transient empty `xrefBox` between the `tagBox.put` and the `xrefBox.put` and leave `emptyList()` stuck in the StateFlow (toggling the favourite star worked around it because `setFavorite` re-touches `noteBox`). New `NoteRepository.saveNoteWithHashtags()` wraps upsert + hashtag reconciliation in a single ObjectBox transaction via `boxStore.callInTx { ... }`, so the per-box observers fire **once** at commit time with the final state. New hashtags now appear in the drawer's Recent Tags list the moment a note is saved — no workaround required.
|
||||||
|
|
||||||
|
## v0.3.0.4 — 2026-08-14
|
||||||
|
|
||||||
|
- **Recent Tags now subscribes to all three boxes.** `observeHashtagsByRecentUse()` now subscribes to **all three** boxes (`noteBox`, `tagBox`, `xrefBox`) — adding a brand-new hashtag only touches `tagBox` + `xrefBox`, so the previous single-`noteBox` subscription missed those updates and the drawer's Recent Tags list only refreshed when something else touched `noteBox` (e.g. toggling the favourite star). Now the new tag is visible immediately after saving the note.
|
||||||
|
|
||||||
|
## v0.3.0.3 — 2026-08-14
|
||||||
|
|
||||||
|
- **Batched hashtag-usage lookups.** `NoteRepositoryImpl.hashtagUsageSnapshot()` (one `Box.get` per distinct noteId and tagId, not per xref) and dropped the manual `trySend(snapshot())` in `observeHashtagsByRecentUse()` — the ObjectBox observer's first fire is now the sole source. The drawer's Recent Tags list fills in well under a second instead of taking minutes.
|
||||||
|
|
||||||
|
## v0.3.0.2 — 2026-08-14
|
||||||
|
|
||||||
|
- **AddTagSheet placeholder cleaned up.** Dropped the redundant leading `#` from the AddTagSheet placeholder (was `#tag-name`, now `hashtag-name` — the leading `#` icon in the field already signals the format).
|
||||||
|
|
||||||
|
## v0.3.0.1 — 2026-08-14
|
||||||
|
|
||||||
|
- **Editor + list-card UI polish.** Editor hashtag row moved to the bottom (and hidden when empty), `+ add` chip removed (use `#` icon in top bar), colour picker centred horizontally, list-card dog-ear colour accent replaces the small circle chip, list cards show a hashtag row (with `+N` abbreviation when capped).
|
||||||
|
|
||||||
|
## v0.3.0.0 — 2026-08-14
|
||||||
|
|
||||||
|
- **Hashtags + bolder colour accent + nav drawer + new version scheme.** Hashtags (visible chips on editor, 5-tag cap, autocomplete) + bolder colour accent + nav drawer (Home / Favorites / Untagged + recent tags) + centred app-bar title + new version scheme
|
||||||
|
|
||||||
|
## v0.2.0.1 — 2026-08-14
|
||||||
|
|
||||||
|
- **Search icon now opens the search bar.** Search icon now actually opens the search bar
|
||||||
|
|
||||||
|
## v0.2.0.0 — 2026-08-14
|
||||||
|
|
||||||
|
- **Polish + favourites, search, colours, checklists, discard dialog, release signing.**
|
||||||
|
|
||||||
|
## v0.1.1.0 — 2026-08-14
|
||||||
|
|
||||||
|
- **Editor IME fix + title/body on list cards.**
|
||||||
|
|
||||||
|
## v0.1.0.0 — 2026-08-14
|
||||||
|
|
||||||
|
- **First MVP: list + editor, ObjectBox, Material 3.**
|
||||||
Executable
+54
@@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# One-off helper: attach PREVIOUS_HISTORY.md notes to EXISTING Gitea
|
||||||
|
# releases that were published before the automatic pipeline existed.
|
||||||
|
#
|
||||||
|
# TOKEN=<gitea-token-with-release-write> ./backfill-release-notes.sh [version ...]
|
||||||
|
#
|
||||||
|
# With no arguments it walks every section of PREVIOUS_HISTORY.md and
|
||||||
|
# silently skips versions that have no release entry / no section.
|
||||||
|
# Idempotent: replaces both the description and the changes-file asset.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
API="${GITEA_API:-https://git.trevena.info/api/v1/repos/nick/incido}"
|
||||||
|
: "${TOKEN:?Set TOKEN to a Gitea token with release write access}"
|
||||||
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||||
|
NOTES_PY="$ROOT/scripts/ci/release-notes.py"
|
||||||
|
|
||||||
|
if [ "$#" -gt 0 ]; then
|
||||||
|
VERSIONS=("$@")
|
||||||
|
else
|
||||||
|
mapfile -t VERSIONS < <(grep -oE '^## v[0-9]+(\.[0-9]+)+' "$ROOT/PREVIOUS_HISTORY.md" | sed 's/^## v//')
|
||||||
|
fi
|
||||||
|
|
||||||
|
for V in "${VERSIONS[@]}"; do
|
||||||
|
TAG="v$V"
|
||||||
|
RID=$(curl -s "$API/releases/tags/$TAG" \
|
||||||
|
-H "Authorization: token $TOKEN" \
|
||||||
|
| python3 -c "import sys,json; print(json.load(sys.stdin).get('id','') or '')")
|
||||||
|
if [ -z "$RID" ]; then echo "skip $TAG (no release entry)"; continue; fi
|
||||||
|
|
||||||
|
NOTES="/tmp/Incido-$V-changes.md"
|
||||||
|
if ! python3 "$NOTES_PY" "$V" --out "$NOTES"; then
|
||||||
|
echo "skip $TAG (no PREVIOUS_HISTORY.md section)"; continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Refresh the description.
|
||||||
|
REL_NOTES_FILE="$NOTES" python3 -c "import json,os; print(json.dumps({'body': open(os.environ['REL_NOTES_FILE'],encoding='utf-8').read()}))" \
|
||||||
|
> /tmp/body_patch.json
|
||||||
|
curl -s -X PATCH "$API/releases/$RID" \
|
||||||
|
-H "Authorization: token $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d @/tmp/body_patch.json > /dev/null
|
||||||
|
|
||||||
|
# Replace a stale changes-file asset, then upload the fresh one.
|
||||||
|
curl -s "$API/releases/$RID/assets" -H "Authorization: token $TOKEN" \
|
||||||
|
| REL_ASSET_NAME="Incido-$V-changes.md" python3 -c "import sys,json,os; [print(a['id']) for a in json.load(sys.stdin) if a['name']==os.environ['REL_ASSET_NAME']]" \
|
||||||
|
| while read -r AID; do
|
||||||
|
curl -s -X DELETE "$API/releases/$RID/assets/$AID" -H "Authorization: token $TOKEN" > /dev/null
|
||||||
|
done
|
||||||
|
curl -s -f -X POST "$API/releases/$RID/assets?name=Incido-$V-changes.md" \
|
||||||
|
-H "Authorization: token $TOKEN" \
|
||||||
|
-F "attachment=@$NOTES" --max-time 600 > /dev/null \
|
||||||
|
|| echo "WARN $TAG: description patched, but the changes-file upload failed"
|
||||||
|
echo "done $TAG"
|
||||||
|
done
|
||||||
Executable
+88
@@ -0,0 +1,88 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Extract the release-notes section for one version from PREVIOUS_HISTORY.md.
|
||||||
|
|
||||||
|
Incido publishes its user-facing changelog through the Gitea Releases page:
|
||||||
|
for every tag push, `.gitea/workflows/release.yml` calls this script with
|
||||||
|
the released version. The matching `## v<VERSION> — <DATE>` section of
|
||||||
|
PREVIOUS_HISTORY.md becomes the release description and is also uploaded
|
||||||
|
next to the APKs as `Incido-<VERSION>-changes.md`.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
release-notes.py <version> [--out FILE] [--history FILE] [--no-footer]
|
||||||
|
|
||||||
|
Exits 0 and prints the Markdown (to --out FILE or stdout) when the section
|
||||||
|
exists; exits 1 (message on stderr) when it doesn't — the workflow then
|
||||||
|
falls back to its generic "Release <tag>" body.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
# "## v0.3.8.0 — 2026-09-16" -> group(1) = "0.3.8.0"
|
||||||
|
HEADING = re.compile(r"^##\s+v?([0-9]+(?:\.[0-9]+)*)\b")
|
||||||
|
|
||||||
|
FOOTER = (
|
||||||
|
"\n\n---\n\n"
|
||||||
|
"_Full history: PREVIOUS_HISTORY.md at the repository root. "
|
||||||
|
"In-depth developer notes: Incido Development Plan \u00a710._\n"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def extract(history_text: str, version: str, footer: bool) -> str | None:
|
||||||
|
wanted = version.lstrip("vV").strip()
|
||||||
|
collected: list[str] = []
|
||||||
|
in_section = False
|
||||||
|
for line in history_text.splitlines():
|
||||||
|
match = HEADING.match(line)
|
||||||
|
if match:
|
||||||
|
in_section = match.group(1) == wanted
|
||||||
|
if in_section:
|
||||||
|
collected.append(line)
|
||||||
|
if not collected:
|
||||||
|
return None
|
||||||
|
body = "\n".join(collected).rstrip()
|
||||||
|
if not body:
|
||||||
|
return None
|
||||||
|
return body + (FOOTER if footer else "")
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||||
|
parser.add_argument("version", help="Version or tag, e.g. 0.3.8.0 or v0.3.8.0")
|
||||||
|
parser.add_argument("--out", type=Path, default=None,
|
||||||
|
help="Write the notes to this file instead of stdout")
|
||||||
|
parser.add_argument("--history", type=Path, default=None,
|
||||||
|
help="Path to PREVIOUS_HISTORY.md "
|
||||||
|
"(default: repo root, two levels above scripts/ci/)")
|
||||||
|
parser.add_argument("--no-footer", action="store_true",
|
||||||
|
help="Omit the standard cross-reference footer")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
history_path = args.history or (
|
||||||
|
Path(__file__).resolve().parents[2] / "PREVIOUS_HISTORY.md"
|
||||||
|
)
|
||||||
|
if not history_path.is_file():
|
||||||
|
print(f"release-notes: history file not found: {history_path}",
|
||||||
|
file=sys.stderr)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
notes = extract(history_path.read_text(encoding="utf-8"),
|
||||||
|
args.version, footer=not args.no_footer)
|
||||||
|
if notes is None:
|
||||||
|
print(f"release-notes: no changelog section for {args.version} "
|
||||||
|
f"in {history_path.name}", file=sys.stderr)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
if args.out:
|
||||||
|
args.out.write_text(notes, encoding="utf-8")
|
||||||
|
print(f"Wrote {len(notes)} chars for v{args.version.lstrip('vV')} "
|
||||||
|
f"to {args.out}")
|
||||||
|
else:
|
||||||
|
sys.stdout.write(notes)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
Reference in new issue
Block a user