4 Commits

Author SHA1 Message Date
Adam Shiervani 1eea5e6bbc chore(scripts): simplify flash/build helpers and dedupe arg/device checks (#67)
- flash_system.sh: rename ota_tar -> system_tar (path is staged
  release-artifacts/<sku>/system.tar, not output/image/update_ota.tar)
  and only re-check device reachability after a --build, not on every
  invocation.
- common.sh: add require_arg and prompt for SKU via normalize_system_sku
  so aliases live in one place; align FLASH_SKU/SYSTEM_SKU precedence
  between build_system.sh and flash_system.sh.
- check_device.sh (new): one wrapper around check_ping/check_ssh used
  by both make check_device and direct CLI, removing the Makefile's
  hardcoded ping -c 1 / root@ duplication.
- release_r2.sh, release_github.sh, run_e2e_tests.sh, build_system.sh,
  flash_system.sh: route all value-taking options through require_arg
  for consistent missing-arg errors.
2026-05-11 10:19:09 +02:00
Adam Shiervani 2d3bc76f14 feat(release): ship update_sd.img.zip as SDMMC recovery artifact (#66)
* feat(release): ship update_sd.img.zip as SDMMC recovery artifact

The SDMMC update.img is a packed Rockchip update image, not a raw disk
image, so it can't be written to a microSD card. Publishing it next to
the real recovery zip just confuses users. Move SDMMC over to
update_sd.img.zip everywhere it's staged, uploaded, or attached:

- common.sh: add recovery_artifact_for_sku() and recovery_source_for_sku()
  so all release scripts agree on which file is the per-SKU recovery
  image and where it lives in the build output. Mirrors the
  RECOVERY_ARTIFACT_BY_SKU map in cloud-api. Unknown SKUs fail loudly.
- build_system.sh: stage only the SKU's recovery artifact -- eMMC keeps
  update.img, SDMMC ships update_sd.img.zip. update.img is still built
  for SDMMC as a side effect; we just stop copying it into staging.
- release_r2.sh: validate/print/upload the SKU's recovery artifact, so
  R2 receives system.tar + update_sd.img.zip (+ .sha256s) for SDMMC and
  system.tar + update.img for eMMC.
- release_github.sh: drop update-sdmmc.img from the GitHub release
  asset list (update_ota-sdmmc.tar and update_sd.img.zip stay).

Pairs with a cloud-api change that points
/releases/system_recovery/latest?sku=jetkvm-v2-sdmmc at the new zip.

* fix(release): propagate unknown-SKU failure from recovery_source_for_sku

recovery_source_for_sku embedded recovery_artifact_for_sku inside echo's
argument via $(...). On an unknown SKU the inner exit 1 only killed the
command-substitution subshell; echo still ran with a partial path and
returned 0, swallowing the intended hard failure and producing a bogus
path. Capture the artifact separately and propagate the non-zero status
so callers actually abort with the original error message.
2026-04-29 10:17:58 +02:00
Adam Shiervani 548144b43a Add SKU-aware system release flow (#64)
* feat(release): add SKU system release flow

Build and stage both storage variants so releases can publish SKU-specific system OTA and recovery artifacts without changing existing EMMC asset names.

* fix(release): clean root-owned output between SKU builds

Mirror the top-level clean path before switching from SDMMC to EMMC so root-owned SDK output does not break the intermediate cleanup.

* fix(release): quiet noisy build steps

Move build cleanup into the build wrapper and capture verbose SDK output in release-artifacts logs while keeping wrapper progress and failure diagnostics visible.

* fix(release): address release script review findings

Preserve quiet build command failures and stage uniquely named GitHub assets before creating releases.
2026-04-27 14:55:46 +02:00
Adam Shiervani 0f14508752 Release pipeline with scripted build/flash/test flow (#55)
* build: bump version to 0.2.8

* Remove non-used script

* Add tests, dev and prod release scripts

* Refactor release process and update Makefile

- Updated Makefile to ensure `dev_release` and `release` targets check for existing GitHub releases and tags with the new naming convention `release/v<version>`.
- Modified `dev_release` to depend on `git_check_dev` and `test` targets.
- Removed obsolete `release_github.sh` and `release.sh` scripts, consolidating functionality into `release_r2.sh`.
- Adjusted build scripts to improve error handling and output consistency.
- Updated GitHub Actions workflow to trigger on pull requests instead of specific branches and tags.

* Release to r2 before making GH release

* Set BUILD_VERSION for the update and system images

* Better log msg

* Refactor build scripts to use variables for args
2026-01-29 11:08:09 +01:00