Release 2.20.0. **Added** - Long-press an event's title, location or description to copy it ([#195]). - Settings → About lists the open-source projects Calendula ships, with copyright holder, licence and a link to each project's source ([#281]). **Changed** - Week and day view seat every hour in its own rounded cell instead of drawing a separator line across the column; an on-the-hour event fills its cell rather than overhanging the seam ([#113]). - Event titles run to the edge of their chip in all three grid views — no ellipsis. RTL keeps it, where clipping would cut the start of the title ([#164]). - Month events show their start time where the chip is wide enough, and event times across month, week and day are set in a regular weight ([#219]). - An invitation you haven't answered is drawn as an outline; declined events keep their filled, struck-through chip and now sort last in the month view ([#230]). - The top-bar title falls back to a shorter form instead of being cut off, and the bar's trailing edge lines up with the grid under it ([#165]). - The jump-to-today button carries today's date and rolls over at midnight ([#220]). - The quick-switch pill hides when there is nothing to switch between, and views can now be turned off down to a single one ([#150]). **Fixed** - A long location wraps and its card grows, instead of scrolling sideways out of sight ([#273]). - The event form capitalizes sentences again; location stays uncapitalized, being as often a URL as an address ([#146]). - A dragged block's floating copy wraps its time and title the way the block does, instead of clipping to one line while held ([#267]). ### Release preparation `versionName`/`versionCode` → 2.20.0/22000, `CHANGELOG.md`'s Unreleased section moved under a dated 2.20.0 heading, and a hand-written 497-character `fastlane/metadata/android/en-US/changelogs/22000.txt`. Six of the merged PRs had no CHANGELOG entry (#146, #150, #195, #230, #267, #281); they are written up here. The existing #164 entry only described the month view and did not mention the RTL exception — both corrected. ### Also here `scripts/check_changelog_lengths.sh`, run in CI next to the reproducible-release invariant. Play rejects a "What's New" over 500 characters, which would fail the upload *after* the release had already shipped to F-Droid and Codeberg — 2.19.4 went out at 697. The script walks every locale, fails on the current `versionCode` and only warns on the already-published files, of which 13 are over the limit from when the pipeline auto-generated them from `CHANGELOG.md`. Deviation worth naming: this does not fix those 13. They are published and Play never re-reads them, so failing on them would paint every PR red for no gain; `--strict` covers them if they are ever backfilled. Follow-up filed as #285 — the store listing exists in only 4 of 12 locales and its graphics still don't qualify for Play. All twelve issues above are closed by their own PRs; this branch ships them. Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de> Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/286
82 lines
3.0 KiB
Bash
Executable File
82 lines
3.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Length guard for the per-version "What's New" files under
|
|
# fastlane/metadata/android/<locale>/changelogs/<versionCode>.txt.
|
|
#
|
|
# Google Play rejects an upload whose "What's New" exceeds 500 characters, and
|
|
# F-Droid truncates a long entry in-client. Play reads only the version being
|
|
# uploaded, so the file for the CURRENT versionCode is release-blocking in every
|
|
# locale it exists in — that is a hard failure here. Older files are already
|
|
# published and Play never looks at them again; they are reported as warnings so
|
|
# a legacy overrun (the pipeline used to auto-generate these from CHANGELOG.md)
|
|
# does not turn every PR red.
|
|
#
|
|
# scripts/check_changelog_lengths.sh current version fails, rest warn
|
|
# scripts/check_changelog_lengths.sh --strict every file must fit
|
|
#
|
|
# The companion scripts/sync_changelog_to_fastlane.sh checks only en-US for the
|
|
# current version, and only as a side effect of ensuring the file exists.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.." # repo root
|
|
|
|
# wc -m counts bytes, not characters, under a C locale — force UTF-8 so "•" and
|
|
# "—" count as the single characters Play sees.
|
|
if locale -a 2>/dev/null | grep -qix 'C.utf8\|C.UTF-8'; then
|
|
export LC_ALL=C.UTF-8
|
|
fi
|
|
|
|
LIMIT=500
|
|
STRICT=0
|
|
[ "${1:-}" = "--strict" ] && STRICT=1
|
|
|
|
VERSION=$(grep -oP 'versionName\s*=\s*"\K[^"]+' app/build.gradle.kts)
|
|
[ -n "$VERSION" ] || { echo "No versionName in app/build.gradle.kts" >&2; exit 1; }
|
|
MAJOR=${VERSION%%.*}; rest=${VERSION#*.}; MINOR=${rest%%.*}; PATCH=${rest##*.}
|
|
VERSION_CODE=$(( ${MAJOR:-0} * 10000 + ${MINOR:-0} * 100 + ${PATCH:-0} ))
|
|
|
|
fail=0
|
|
warned=0
|
|
current=0
|
|
|
|
shopt -s nullglob
|
|
for f in fastlane/metadata/android/*/changelogs/*.txt; do
|
|
locale_dir=$(basename "$(dirname "$(dirname "$f")")")
|
|
code=$(basename "$f" .txt)
|
|
chars=$(wc -m < "$f" | tr -d ' ')
|
|
|
|
if [ "$code" = "$VERSION_CODE" ]; then
|
|
current=$((current + 1))
|
|
if [ ! -s "$f" ]; then
|
|
echo "ERROR: $f is empty." >&2
|
|
fail=1
|
|
elif [ "$chars" -gt "$LIMIT" ]; then
|
|
echo "ERROR: $f is $chars chars (limit $LIMIT) — Play would reject this release." >&2
|
|
fail=1
|
|
else
|
|
printf 'OK: %-6s %s — %s chars\n' "$locale_dir" "$code" "$chars"
|
|
fi
|
|
elif [ "$chars" -gt "$LIMIT" ]; then
|
|
if [ "$STRICT" -eq 1 ]; then
|
|
echo "ERROR: $f is $chars chars (limit $LIMIT)." >&2
|
|
fail=1
|
|
else
|
|
echo "warning: $f is $chars chars (limit $LIMIT) — already published, left as is." >&2
|
|
warned=$((warned + 1))
|
|
fi
|
|
fi
|
|
done
|
|
|
|
if [ "$current" -eq 0 ]; then
|
|
echo "ERROR: no changelog for version $VERSION (code $VERSION_CODE)." >&2
|
|
echo " Write fastlane/metadata/android/en-US/changelogs/$VERSION_CODE.txt" >&2
|
|
echo " before releasing — see docs/RELEASING.md step 3." >&2
|
|
fail=1
|
|
fi
|
|
|
|
if [ "$fail" -ne 0 ]; then
|
|
echo >&2
|
|
echo "Fix the changelog(s) above before releasing." >&2
|
|
exit 1
|
|
fi
|
|
[ "$warned" -gt 0 ] && echo "$warned older changelog(s) over the limit — warnings only."
|
|
echo "All release-blocking changelogs fit in $LIMIT characters."
|