Skip to content

Commit 5b57504

Browse files
authored
Merge pull request #237 from OpenIPC/release/no-sha256sums
release: no SHA256SUMS, no checksum step in the docs (#236)
2 parents 1e6e7bd + 23e082a commit 5b57504

6 files changed

Lines changed: 21 additions & 34 deletions

File tree

‎.github/publish-latest.sh‎

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# "Decoder <version>"; basic keeps the tag and the title;
1010
# - the notes hold one line per branch, "Decoder <v2 version> (...)" and
1111
# "Legacy `basic` <version> (...)"; each build rewrites its own line;
12-
# - SHA256SUMS is computed again over all the release's files.
12+
# - a SHA256SUMS left from earlier releases is removed (no checksums, #236).
1313
#
1414
# Writes new=true to $GITHUB_OUTPUT when the branch's version differs from
1515
# the one the release had, so only a new version goes to Telegram.
@@ -80,34 +80,24 @@ echo "previous $branch version: ${prev:-none}, now $ver"
8080
{
8181
[ -z "$v2line" ] || printf '%s\n' "$v2line"
8282
[ -z "$basicline" ] || printf '%s\n' "$basicline"
83-
printf '\nCheck: `sha256sum -c SHA256SUMS`. Changes: [CHANGELOG.md](%s/blob/v2/CHANGELOG.md); installation: [README](%s#readme).\n' "$url" "$url"
83+
printf '\nChanges: [CHANGELOG.md](%s/blob/v2/CHANGELOG.md); installation: [README](%s#readme).\n' "$url" "$url"
8484
} > notes.md
8585

86-
# SHA256SUMS before anything changes: the other branch's files as the
87-
# release has them now, plus this build's files; a v2 build without a
88-
# mapping drops the previous one.
89-
sums=$(mktemp -d)
90-
if [ "$exists" = 1 ]; then
91-
gh release download latest --dir "$sums" # every file the release holds
92-
fi
93-
rm -f "$sums/SHA256SUMS"
94-
[ "$branch" = v2 ] && [ "$mapping" = 0 ] && rm -f "$sums/decoder-v2-mapping.txt"
95-
cp "$@" "$sums/"
96-
(cd "$sums" && find . -maxdepth 1 -type f -printf '%f\n' | LC_ALL=C sort | xargs sha256sum) > "$sums.sums"
97-
mv "$sums.sums" "$sums/SHA256SUMS"
98-
(cd "$sums" && sha256sum -c SHA256SUMS)
99-
10086
if [ "$exists" = 0 ]; then
10187
# a "latest" tag left without its release would keep its old commit under --target
10288
if [ "$branch" = v2 ]; then
10389
gh api -X PATCH "repos/${GITHUB_REPOSITORY}/git/refs/tags/latest" -f sha="$GITHUB_SHA" -F force=true \
10490
>/dev/null 2>&1 || true
10591
fi
106-
gh release create latest "$@" "$sums/SHA256SUMS" --latest --target "$GITHUB_SHA" \
92+
gh release create latest "$@" --latest --target "$GITHUB_SHA" \
10793
--title "$title" --notes-file notes.md
10894
else
109-
# this build's files and the new SHA256SUMS in one upload
110-
gh release upload latest "$@" "$sums/SHA256SUMS" --clobber
95+
gh release upload latest "$@" --clobber
96+
# a SHA256SUMS from before #236: removed if the release still has one; a failure stops here
97+
assets=$(gh release view latest --json assets -q '.assets[].name') # a lookup error stops here
98+
if printf '%s\n' "$assets" | grep -qx SHA256SUMS; then
99+
gh release delete-asset latest SHA256SUMS --yes
100+
fi
111101
if [ "$branch" = v2 ] && [ "$mapping" = 0 ]; then
112102
gh release delete-asset latest decoder-v2-mapping.txt --yes 2>/dev/null || true
113103
fi
@@ -116,4 +106,4 @@ else
116106
fi
117107
gh release edit latest --title "$title" --notes-file notes.md --latest
118108
fi
119-
rm -rf "$sums" notes.md err.txt
109+
rm -f notes.md err.txt

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ jobs:
154154
path: ${{ steps.vars.outputs.name }}.apk
155155

156156
# The one release, "latest" (#194, #229): updated in place by v2 and basic, each with its
157-
# own files; v2 moves the tag to its commit and sets the title "Decoder <version>";
158-
# SHA256SUMS covers all files. A new version (not every build) goes to Telegram. The
157+
# own files; v2 moves the tag to its commit and sets the title "Decoder <version>".
158+
# A new version (not every build) goes to Telegram. The
159159
# concurrency group is shared with basic's workflow: one publish at a time.
160160
publish:
161161
needs: build

‎README.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Ready-to-install builds are in the one release, [**latest**](https://github.com/
4444
|------------------|----------------------------------------|------------------------------------------------------------------------------|
4545
| `decoder-v2.apk` | **Current version**, recommended | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder-v2.apk> |
4646
| `decoder.apk` | Legacy version from the `basic` branch | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder.apk> |
47-
| `SHA256SUMS` | Checksums: `sha256sum -c SHA256SUMS` | <https://github.com/OpenIPC/decoder/releases/latest/download/SHA256SUMS> |
4847

4948
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)).
5049

‎README.ru.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@
4040

4141
Готовые сборки лежат в единственном релизе [**latest**](https://github.com/OpenIPC/decoder/releases/latest) с заголовком `Decoder <версия>`. В именах файлов нет версии, поэтому эти ссылки не меняются:
4242

43-
| Файл | Что это | Постоянная ссылка |
44-
|------------------|----------------------------------------------|------------------------------------------------------------------------------|
45-
| `decoder-v2.apk` | **Текущая версия**, рекомендуется | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder-v2.apk> |
46-
| `decoder.apk` | Старая версия из ветки `basic` | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder.apk> |
47-
| `SHA256SUMS` | Контрольные суммы: `sha256sum -c SHA256SUMS` | <https://github.com/OpenIPC/decoder/releases/latest/download/SHA256SUMS> |
43+
| Файл | Что это | Постоянная ссылка |
44+
|------------------|-----------------------------------|------------------------------------------------------------------------------|
45+
| `decoder-v2.apk` | **Текущая версия**, рекомендуется | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder-v2.apk> |
46+
| `decoder.apk` | Старая версия из ветки `basic` | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder.apk> |
4847

4948
Каждая новая сборка заменяет предыдущую в `latest`. Разработка идёт непрерывно, поэтому отдельных релизов по версиям нет; каждая новая версия веток `v2` и `basic` с коммитом публикуется в Telegram-канале OpenIPC ([наши каналы](https://openipc.org/our-channels)).
5049

‎README.zh-CN.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@
4040

4141
可直接安装的版本位于唯一的发布 [**latest**](https://github.com/OpenIPC/decoder/releases/latest),标题为 `Decoder <版本>`。文件名不含版本号,因此以下链接始终不变:
4242

43-
| 文件 | 说明 | 永久链接 |
44-
|------------------|-----------------------------------|------------------------------------------------------------------------------|
45-
| `decoder-v2.apk` | **当前版本**,推荐使用 | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder-v2.apk> |
46-
| `decoder.apk` | `basic` 分支的旧版本 | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder.apk> |
47-
| `SHA256SUMS` | 校验和:`sha256sum -c SHA256SUMS` | <https://github.com/OpenIPC/decoder/releases/latest/download/SHA256SUMS> |
43+
| 文件 | 说明 | 永久链接 |
44+
|------------------|------------------------|------------------------------------------------------------------------------|
45+
| `decoder-v2.apk` | **当前版本**,推荐使用 | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder-v2.apk> |
46+
| `decoder.apk` | `basic` 分支的旧版本 | <https://github.com/OpenIPC/decoder/releases/latest/download/decoder.apk> |
4847

4948
每次新构建都会替换 `latest` 中的上一个构建。开发是持续进行的,因此不再按版本单独发布;`v2` 和 `basic` 分支的每个新版本连同提交都会发布到 OpenIPC 的 Telegram 频道([我们的频道](https://openipc.org/our-channels))。
5049

‎docs/testing.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ CI is the reference: the project does not depend on local builds.
5050
- 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.
5151
- 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).
5252
- **`CHANGELOG.md`** is the change history: the version bump commit of a pull request that changes the app adds the version's section (`## <version> — <date>`, newest first) in the same pull request.
53-
- 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 <version>`; 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).
53+
- 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 <version>`; 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).
5454
- **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.
5555

5656
```sh

0 commit comments

Comments
 (0)