From d7ef65bac8abc61d72608ead9ad2767288277b2b Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Sat, 17 Oct 2026 22:58:25 +0000 Subject: [PATCH 1/3] release: no SHA256SUMS, no checksum step in the docs (#236) Users need not check the downloaded APKs against checksums: publish-latest.sh no longer computes and uploads SHA256SUMS (and so no longer downloads the release's files first), removes a SHA256SUMS left from earlier publications, and the notes drop the "Check:" line. READMEs: SHA256SUMS is gone from the Download table; docs/testing.md and the build.yml comment no longer mention it. The same script goes to basic in a PR there. Tested with gh stubbed: an existing latest with SHA256SUMS gets the new APK and mapping, the old SHA256SUMS is deleted, title and notes are set without the checksum line. shellcheck clean. Refs #236 --- .github/publish-latest.sh | 26 ++++++-------------------- .github/workflows/build.yml | 4 ++-- README.md | 1 - README.ru.md | 9 ++++----- README.zh-CN.md | 9 ++++----- docs/testing.md | 2 +- 6 files changed, 17 insertions(+), 34 deletions(-) diff --git a/.github/publish-latest.sh b/.github/publish-latest.sh index 715bbc2..81ca0a0 100755 --- a/.github/publish-latest.sh +++ b/.github/publish-latest.sh @@ -9,7 +9,7 @@ # "Decoder "; basic keeps the tag and the title; # - the notes hold one line per branch, "Decoder (...)" and # "Legacy `basic` (...)"; each build rewrites its own line; -# - SHA256SUMS is computed again over all the release's files. +# - a SHA256SUMS left from earlier releases is removed (no checksums, #236). # # Writes new=true to $GITHUB_OUTPUT when the branch's version differs from # the one the release had, so only a new version goes to Telegram. @@ -80,34 +80,20 @@ echo "previous $branch version: ${prev:-none}, now $ver" { [ -z "$v2line" ] || printf '%s\n' "$v2line" [ -z "$basicline" ] || printf '%s\n' "$basicline" - printf '\nCheck: `sha256sum -c SHA256SUMS`. Changes: [CHANGELOG.md](%s/blob/v2/CHANGELOG.md); installation: [README](%s#readme).\n' "$url" "$url" + printf '\nChanges: [CHANGELOG.md](%s/blob/v2/CHANGELOG.md); installation: [README](%s#readme).\n' "$url" "$url" } > notes.md -# SHA256SUMS before anything changes: the other branch's files as the -# release has them now, plus this build's files; a v2 build without a -# mapping drops the previous one. -sums=$(mktemp -d) -if [ "$exists" = 1 ]; then - gh release download latest --dir "$sums" # every file the release holds -fi -rm -f "$sums/SHA256SUMS" -[ "$branch" = v2 ] && [ "$mapping" = 0 ] && rm -f "$sums/decoder-v2-mapping.txt" -cp "$@" "$sums/" -(cd "$sums" && find . -maxdepth 1 -type f -printf '%f\n' | LC_ALL=C sort | xargs sha256sum) > "$sums.sums" -mv "$sums.sums" "$sums/SHA256SUMS" -(cd "$sums" && sha256sum -c SHA256SUMS) - if [ "$exists" = 0 ]; then # a "latest" tag left without its release would keep its old commit under --target if [ "$branch" = v2 ]; then gh api -X PATCH "repos/${GITHUB_REPOSITORY}/git/refs/tags/latest" -f sha="$GITHUB_SHA" -F force=true \ >/dev/null 2>&1 || true fi - gh release create latest "$@" "$sums/SHA256SUMS" --latest --target "$GITHUB_SHA" \ + gh release create latest "$@" --latest --target "$GITHUB_SHA" \ --title "$title" --notes-file notes.md else - # this build's files and the new SHA256SUMS in one upload - gh release upload latest "$@" "$sums/SHA256SUMS" --clobber + gh release upload latest "$@" --clobber + gh release delete-asset latest SHA256SUMS --yes 2>/dev/null || true # from before #236 if [ "$branch" = v2 ] && [ "$mapping" = 0 ]; then gh release delete-asset latest decoder-v2-mapping.txt --yes 2>/dev/null || true fi @@ -116,4 +102,4 @@ else fi gh release edit latest --title "$title" --notes-file notes.md --latest fi -rm -rf "$sums" notes.md err.txt +rm -f notes.md err.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7a807f..1ccd300 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -154,8 +154,8 @@ jobs: path: ${{ steps.vars.outputs.name }}.apk # The one release, "latest" (#194, #229): updated in place by v2 and basic, each with its - # own files; v2 moves the tag to its commit and sets the title "Decoder "; - # SHA256SUMS covers all files. A new version (not every build) goes to Telegram. The + # own files; v2 moves the tag to its commit and sets the title "Decoder ". + # A new version (not every build) goes to Telegram. The # concurrency group is shared with basic's workflow: one publish at a time. publish: needs: build diff --git a/README.md b/README.md index 0b6e6fe..c2c51ba 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ Ready-to-install builds are in the one release, [**latest**](https://github.com/ |------------------|----------------------------------------|------------------------------------------------------------------------------| | `decoder-v2.apk` | **Current version**, recommended | | | `decoder.apk` | Legacy version from the `basic` branch | | -| `SHA256SUMS` | Checksums: `sha256sum -c SHA256SUMS` | | Every build is replaced in `latest` by the next one. Development is continuous, so there are no releases per version; every new `v2` and `basic` version is also posted with its commit to the OpenIPC Telegram channel ([our channels](https://openipc.org/our-channels)). diff --git a/README.ru.md b/README.ru.md index 6dc6663..1bdd4e3 100644 --- a/README.ru.md +++ b/README.ru.md @@ -40,11 +40,10 @@ Готовые сборки лежат в единственном релизе [**latest**](https://github.com/OpenIPC/decoder/releases/latest) с заголовком `Decoder <версия>`. В именах файлов нет версии, поэтому эти ссылки не меняются: -| Файл | Что это | Постоянная ссылка | -|------------------|----------------------------------------------|------------------------------------------------------------------------------| -| `decoder-v2.apk` | **Текущая версия**, рекомендуется | | -| `decoder.apk` | Старая версия из ветки `basic` | | -| `SHA256SUMS` | Контрольные суммы: `sha256sum -c SHA256SUMS` | | +| Файл | Что это | Постоянная ссылка | +|------------------|-----------------------------------|------------------------------------------------------------------------------| +| `decoder-v2.apk` | **Текущая версия**, рекомендуется | | +| `decoder.apk` | Старая версия из ветки `basic` | | Каждая новая сборка заменяет предыдущую в `latest`. Разработка идёт непрерывно, поэтому отдельных релизов по версиям нет; каждая новая версия веток `v2` и `basic` с коммитом публикуется в Telegram-канале OpenIPC ([наши каналы](https://openipc.org/our-channels)). diff --git a/README.zh-CN.md b/README.zh-CN.md index 5d1e6cd..a82c0c4 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -40,11 +40,10 @@ 可直接安装的版本位于唯一的发布 [**latest**](https://github.com/OpenIPC/decoder/releases/latest),标题为 `Decoder <版本>`。文件名不含版本号,因此以下链接始终不变: -| 文件 | 说明 | 永久链接 | -|------------------|-----------------------------------|------------------------------------------------------------------------------| -| `decoder-v2.apk` | **当前版本**,推荐使用 | | -| `decoder.apk` | `basic` 分支的旧版本 | | -| `SHA256SUMS` | 校验和:`sha256sum -c SHA256SUMS` | | +| 文件 | 说明 | 永久链接 | +|------------------|------------------------|------------------------------------------------------------------------------| +| `decoder-v2.apk` | **当前版本**,推荐使用 | | +| `decoder.apk` | `basic` 分支的旧版本 | | 每次新构建都会替换 `latest` 中的上一个构建。开发是持续进行的,因此不再按版本单独发布;`v2` 和 `basic` 分支的每个新版本连同提交都会发布到 OpenIPC 的 Telegram 频道([我们的频道](https://openipc.org/our-channels))。 diff --git a/docs/testing.md b/docs/testing.md index e6d32e9..6acab53 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -50,7 +50,7 @@ CI is the reference: the project does not depend on local builds. - Versions are **`MAJOR.MINOR.PATCH`** (`versionName` in `android/app/build.gradle`): PATCH for fixes and small changes, MINOR for a new feature, MAJOR for an incompatible change or a large update, only when the maintainer decides. Every pull request that changes the app or its build (`android/`, except the unit tests) bumps the version as its last commit before the merge: `versionName` by that rule and `versionCode` +1. Docs-only, test-only and CI-only pull requests do not. Numbers are not reserved for open pull requests: each one takes the next number when it is merged. CI checks this on every pull request (`.github/check-version.sh`): a new number must be canonical (no leading zeros), greater than the base one, and come with its own `CHANGELOG.md` section. - Until 2.17 `v2` counted **2.xx** (+0.01 per pull request); 2.17 is followed by 2.17.1 or 2.18.0. `basic` keeps its 1.7.x line (1.07.1 is 1.7.1). - **`CHANGELOG.md`** is the change history: the version bump commit of a pull request that changes the app adds the version's section (`## — `, newest first) in the same pull request. -- Development is continuous, so there is **no release per version** (#194). The one release, [`latest`](https://github.com/OpenIPC/decoder/releases/latest), holds the newest `v2` and `basic` builds and is updated in place by both (`.github/publish-latest.sh`, #229): each branch replaces only its own files; a `v2` build moves the `latest` tag to the commit it built and sets the title `Decoder `; the notes have one line per branch with its version and commit; `SHA256SUMS` covers all files. Every **new version** (not every build) of `v2` and `basic` is posted to the OpenIPC Telegram channel, where the older builds can be found. Builds of other branches are only workflow artifacts of their runs (90 days). +- Development is continuous, so there is **no release per version** (#194). The one release, [`latest`](https://github.com/OpenIPC/decoder/releases/latest), holds the newest `v2` and `basic` builds and is updated in place by both (`.github/publish-latest.sh`, #229): each branch replaces only its own files; a `v2` build moves the `latest` tag to the commit it built and sets the title `Decoder `; the notes have one line per branch with its version and commit. Every **new version** (not every build) of `v2` and `basic` is posted to the OpenIPC Telegram channel, where the older builds can be found. Builds of other branches are only workflow artifacts of their runs (90 days). - **Test pre-releases**: to let a reporter test a branch, a pre-release named after the issue is made by hand from the branch's CI artifact (never from a local build), e.g. [`toys-187-test2`](https://github.com/OpenIPC/decoder/releases/tag/toys-187-test2) for #187. It is deleted when the test is over, or replaced by the next one. ```sh From 0b0e9af7fd676db0c78223f19242b20136d3740b Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Sat, 17 Oct 2026 23:00:22 +0000 Subject: [PATCH 2/3] release: a left-over SHA256SUMS is removed only if present, and a failure stops (#236) Qodo: deleting the old SHA256SUMS hid every error, so a failed deletion left it in latest with the job green. It is now deleted only when the release lists it, and an error stops the publish. Refs #236 --- .github/publish-latest.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/publish-latest.sh b/.github/publish-latest.sh index 81ca0a0..56dcfa5 100755 --- a/.github/publish-latest.sh +++ b/.github/publish-latest.sh @@ -93,7 +93,10 @@ if [ "$exists" = 0 ]; then --title "$title" --notes-file notes.md else gh release upload latest "$@" --clobber - gh release delete-asset latest SHA256SUMS --yes 2>/dev/null || true # from before #236 + # a SHA256SUMS from before #236: removed if the release still has one; a failure stops here + if gh release view latest --json assets -q '.assets[].name' | grep -qx SHA256SUMS; then + gh release delete-asset latest SHA256SUMS --yes + fi if [ "$branch" = v2 ] && [ "$mapping" = 0 ]; then gh release delete-asset latest decoder-v2-mapping.txt --yes 2>/dev/null || true fi From 23e082aa71ac771c982d6509c0348b10c44abf13 Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Sat, 17 Oct 2026 23:09:03 +0000 Subject: [PATCH 3/3] release: a failed asset lookup stops the cleanup of SHA256SUMS (#236) Qodo: inside the if, a failed gh release view looked like "no SHA256SUMS". The asset list is read first, so an error stops the publish. Refs #236 --- .github/publish-latest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/publish-latest.sh b/.github/publish-latest.sh index 56dcfa5..4b69793 100755 --- a/.github/publish-latest.sh +++ b/.github/publish-latest.sh @@ -94,7 +94,8 @@ if [ "$exists" = 0 ]; then else gh release upload latest "$@" --clobber # a SHA256SUMS from before #236: removed if the release still has one; a failure stops here - if gh release view latest --json assets -q '.assets[].name' | grep -qx SHA256SUMS; then + assets=$(gh release view latest --json assets -q '.assets[].name') # a lookup error stops here + if printf '%s\n' "$assets" | grep -qx SHA256SUMS; then gh release delete-asset latest SHA256SUMS --yes fi if [ "$branch" = v2 ] && [ "$mapping" = 0 ]; then