From f5090667b97696183747e757b70c772bdc584d89 Mon Sep 17 00:00:00 2001 From: agessaman Date: Sun, 19 Jul 2026 22:37:09 -0700 Subject: [PATCH] build: add FILENAME_CHANNEL_TAG; dev channel tags asset filenames with -dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dev-channel assets are now named -v1.16.0-dev-.bin so a downloaded file identifies its channel at a glance; production names are unchanged (tag unset). The tag sits between version and hash, lowercase letters only — the flasher-side parsers (gen-slim ASSET_RE, /releases Worker label+dedupe, flasher.js stale-URL recovery) were made tag-tolerant first and are already deployed. Filename-end hash extraction (release pruning) is position-independent and unaffected. Pushing this intentionally triggers a beta build: that publish is what applies the new naming. The Worker's dedupe collapses the untagged 9276b6a generation and the new tagged one to the newest per env, so the flasher never lists both. --- .github/workflows/build-observer-firmwares-beta.yml | 5 +++++ build.sh | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-observer-firmwares-beta.yml b/.github/workflows/build-observer-firmwares-beta.yml index 7815e177d..73c6fd40c 100644 --- a/.github/workflows/build-observer-firmwares-beta.yml +++ b/.github/workflows/build-observer-firmwares-beta.yml @@ -69,6 +69,11 @@ env: # and ota_extractHash() takes the token after the last, so tags in between are # transparent. OTA_CHANNEL_TAG: beta-dev + # Marks the asset *filenames*, e.g. -v1.16.0-dev-abc1234.bin, so a + # downloaded file identifies its channel at a glance. Lowercase letters only — + # the filename parsers (gen-slim ASSET_RE, the /releases Worker, flasher.js) + # accept exactly (?:-[a-z]+)? between version and hash. + FILENAME_CHANNEL_TAG: "-dev" # Beta's own build counter, so the two channels' build numbers never interleave. COUNTER_URL: https://observer.gessaman.com/observer-beta-build-counter.json diff --git a/build.sh b/build.sh index a8984d863..8d917a224 100755 --- a/build.sh +++ b/build.sh @@ -134,8 +134,12 @@ build_firmware() { fi # set firmware version string (used for the output filename) - # e.g: v1.0.0-abcdef - FIRMWARE_VERSION_STRING="${FIRMWARE_VERSION}-${COMMIT_HASH}" + # e.g: v1.0.0-abcdef — or v1.0.0-dev-abcdef when FILENAME_CHANNEL_TAG is set + # ("-dev" on the dev channel), so downloaded files identify their channel at + # a glance. Lowercase-letters-only tag: every filename parser (flasher + # gen-slim-manifests ASSET_RE, the /releases Worker, flasher.js stale-URL + # recovery) accepts exactly (?:-[a-z]+)? between version and hash. + FIRMWARE_VERSION_STRING="${FIRMWARE_VERSION}${FILENAME_CHANNEL_TAG:-}-${COMMIT_HASH}" # craft filename # e.g: RAK_4631_Repeater-v1.0.0-SHA