mirror of
https://github.com/jetkvm/rv1106-system.git
synced 2026-05-21 05:20:41 +00:00
feat(release): download per-SKU app binary (#65)
update_app.sh now requires a SKU and downloads from api.jetkvm.com/releases/app/latest?sku=<sku>, so SDMMC and EMMC builds get the matching app binary instead of sharing one. Build script downloads the binary inside each variant build, and CI passes the SKU from the matrix.
This commit is contained in:
@@ -12,7 +12,11 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
board: [EMMC, SDMMC]
|
||||
include:
|
||||
- board: EMMC
|
||||
sku: jetkvm-v2
|
||||
- board: SDMMC
|
||||
sku: jetkvm-v2-sdmmc
|
||||
name: Build (${{ matrix.board }})
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -40,7 +44,7 @@ jobs:
|
||||
echo "BUILD_VERSION_SOURCE=$BUILD_VERSION_SOURCE" >> $GITHUB_ENV
|
||||
echo "$BUILD_VERSION" > VERSION
|
||||
- name: Update jetkvm_app
|
||||
run: ./update_app.sh
|
||||
run: ./update_app.sh "${{ matrix.sku }}"
|
||||
- name: Build
|
||||
run: |
|
||||
echo "Version: $BUILD_VERSION (from $BUILD_VERSION_SOURCE)"
|
||||
|
||||
@@ -128,6 +128,7 @@ build_system_variant() {
|
||||
local require_sd_zip="${4:-false}"
|
||||
|
||||
run_quiet "Selecting ${label} board (${sku})" ./build.sh lunch "$board_config"
|
||||
run_quiet "Updating JetKVM app binary for ${label} (${sku})" ./update_app.sh "$sku"
|
||||
run_quiet "Building ${label} system image" ./build.sh
|
||||
|
||||
stage_system_variant "$label" "$sku" "$require_sd_zip"
|
||||
@@ -141,8 +142,6 @@ msg_info " Cleaning previous build output..."
|
||||
sudo rm -rf output/
|
||||
run_quiet "Cleaning SDK output" ./build.sh clean
|
||||
|
||||
run_quiet "Updating JetKVM app binary" ./update_app.sh
|
||||
|
||||
rm -rf "$SYSTEM_RELEASE_DIR"
|
||||
|
||||
build_system_variant "SDMMC" "$SDMMC_SKU" "$SDMMC_BOARD_CONFIG" true
|
||||
|
||||
+8
-12
@@ -1,22 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -eE
|
||||
set -x
|
||||
set -eE
|
||||
|
||||
# Download latest app binary
|
||||
curl -L https://api.jetkvm.com/releases/app/latest -o /tmp/jetkvm_app
|
||||
SKU="${1:?Error: SKU is required (usage: $0 <sku>)}"
|
||||
|
||||
# Verify download completed successfully
|
||||
if [ ! -f /tmp/jetkvm_app ]; then
|
||||
echo "Error: Failed to download latest app binary"
|
||||
curl -fL "https://api.jetkvm.com/releases/app/latest?sku=${SKU}" -o /tmp/jetkvm_app
|
||||
|
||||
if [ ! -s /tmp/jetkvm_app ]; then
|
||||
echo "Error: Failed to download latest app binary for SKU ${SKU}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make executable
|
||||
chmod +x /tmp/jetkvm_app
|
||||
|
||||
# Replace existing binary
|
||||
mv /tmp/jetkvm_app project/app/jetkvm/jetkvm/bin/jetkvm_app
|
||||
|
||||
echo "Successfully updated jetkvm_app to latest version"
|
||||
echo "Successfully updated jetkvm_app to latest version for SKU ${SKU}"
|
||||
|
||||
rm -rf project/app/jetkvm/out
|
||||
rm -rf project/app/jetkvm/out
|
||||
|
||||
Reference in New Issue
Block a user