Skip to content

Commit 5908ff3

Browse files
committed
Rename firmware channels (latest->dev, stable->testing, new stable)
1 parent e88f807 commit 5908ff3

12 files changed

Lines changed: 247 additions & 65 deletions

.github/workflows/github-pages.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ jobs:
5656
submodules: recursive
5757
path: espargos.github.io
5858

59-
- name: Download firmware artifacts (latest + stable)
59+
- name: Download firmware artifacts (dev + testing)
6060
env:
6161
CONTROLLER_FIRMWARE_TOKEN: ${{ secrets.CONTROLLER_FIRMWARE_TOKEN }}
6262
SENSOR_FIRMWARE_TOKEN: ${{ secrets.SENSOR_FIRMWARE_TOKEN }}
6363
run: |
6464
set -euo pipefail
65-
mkdir -p ./espargos.github.io/site/content/firmware/latest
66-
mkdir -p ./espargos.github.io/site/content/firmware/stable
65+
mkdir -p ./espargos.github.io/site/content/firmware/dev
66+
mkdir -p ./espargos.github.io/site/content/firmware/testing
6767
6868
for repo in controller-firmware sensor-firmware; do
6969
if [[ "$repo" == "controller-firmware" ]]; then
@@ -79,12 +79,12 @@ jobs:
7979
exit 1
8080
fi
8181
82-
for branch in main stable; do
82+
for branch in main testing; do
8383
echo "Finding artifacts for $repo, branch $branch"
8484
85-
channel="latest"
86-
if [[ "$branch" == "stable" ]]; then
87-
channel="stable"
85+
channel="dev"
86+
if [[ "$branch" == "testing" ]]; then
87+
channel="testing"
8888
fi
8989
9090
run_id=$(GH_TOKEN="$token" gh api \

release-stable-from-testing.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Promote firmware from testing -> stable by downloading from espargos.net.
5+
# This script writes into site/content/firmware/stable.
6+
7+
BASE_URL="${BASE_URL:-https://espargos.net/firmware}"
8+
SOURCE_CHANNEL="${SOURCE_CHANNEL:-testing}"
9+
TARGET_CHANNEL="${TARGET_CHANNEL:-stable}"
10+
11+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12+
FIRMWARE_ROOT="$SCRIPT_DIR/site/content/firmware"
13+
TARGET_DIR="$FIRMWARE_ROOT/$TARGET_CHANNEL"
14+
15+
FILES=(
16+
"espargos-sensor-artifact.json"
17+
"espargos-controller-artifact.json"
18+
"espargos-sensor-firmware.bin"
19+
"sensor-firmware-partition.bin"
20+
"espargos-controller-firmware.bin"
21+
"espargos-controller-assets.bin"
22+
"espargos-controller-recovery.bin"
23+
)
24+
25+
if ! command -v curl >/dev/null 2>&1; then
26+
echo "Error: curl is required but not installed." >&2
27+
exit 1
28+
fi
29+
30+
TMP_DIR="$(mktemp -d)"
31+
cleanup() {
32+
rm -rf "$TMP_DIR"
33+
}
34+
trap cleanup EXIT
35+
36+
mkdir -p "$TARGET_DIR"
37+
38+
echo "Promoting firmware from '$SOURCE_CHANNEL' to '$TARGET_CHANNEL'"
39+
echo "Source: $BASE_URL/$SOURCE_CHANNEL"
40+
echo "Target: $TARGET_DIR"
41+
echo
42+
43+
for file in "${FILES[@]}"; do
44+
src="$BASE_URL/$SOURCE_CHANNEL/$file"
45+
dst="$TMP_DIR/$file"
46+
echo "Downloading: $src"
47+
curl --fail --location --silent --show-error --retry 3 --retry-all-errors \
48+
--output "$dst" "$src"
49+
done
50+
51+
for file in "${FILES[@]}"; do
52+
install -m 0644 "$TMP_DIR/$file" "$TARGET_DIR/$file"
53+
done
54+
55+
echo
56+
echo "Done. Stable channel was updated with:"
57+
for file in "${FILES[@]}"; do
58+
echo " - $TARGET_CHANNEL/$file"
59+
done
60+
echo
61+
echo "Next step: review and commit changes."

site/content/firmware/_index.html

Lines changed: 156 additions & 56 deletions
Large diffs are not rendered by default.

site/content/firmware/controller-recovery-latest-manifest.json renamed to site/content/firmware/controller-recovery-dev-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "espargos-controller-firmware",
3-
"version": "latest",
3+
"version": "dev",
44
"new_install_prompt_erase": false,
55
"builds": [
66
{
77
"chipFamily": "ESP32",
88
"parts": [
9-
{ "path": "latest/espargos-controller-recovery.bin", "offset": 0 }
9+
{ "path": "dev/espargos-controller-recovery.bin", "offset": 0 }
1010
]
1111
}
1212
]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "espargos-controller-firmware",
3+
"version": "testing",
4+
"new_install_prompt_erase": false,
5+
"builds": [
6+
{
7+
"chipFamily": "ESP32",
8+
"parts": [
9+
{ "path": "testing/espargos-controller-recovery.bin", "offset": 0 }
10+
]
11+
}
12+
]
13+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"build_date": "2026-02-25T16:13:15Z",
3+
"build_version": "5872435"
4+
}
2 MB
Binary file not shown.
1.22 MB
Binary file not shown.
16 MB
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"build_date": "2026-02-25T16:13:17Z",
3+
"build_version": "70926fd"
4+
}

0 commit comments

Comments
 (0)