Skip to content

Commit

Permalink
cleanup & web installer asks if config should be overwritten or not
Browse files Browse the repository at this point in the history
  • Loading branch information
jschroeter committed Jun 22, 2024
1 parent a8b8320 commit 5b6d483
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ jobs:
VERSION=${GITHUB_REF#refs/heads/}
fi
SHORT_SHA=$(git rev-parse --short HEAD)
echo "GDOOR_VERSION=${VERSION}+${SHORT_SHA}" >> $GITHUB_ENV
GDOOR_VERSION=${VERSION}+${SHORT_SHA}
echo "GDOOR_VERSION=${GDOOR_VERSION}" >> $GITHUB_ENV
echo GDOOR_VERSION=${GDOOR_VERSION}
- name: Install PlatformIO Core
run: pip install --upgrade platformio

- name: Build PlatformIO Project
run: pio run

- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -49,8 +51,8 @@ jobs:
./firmware/esp32/gdoor/.pio/build/GDOOR_ESP32MINI/*.bin
./firmware/esp32/gdoor/.pio/build/GDOOR_ESP32MINI/web
# on main branch: push firmware to web flasher
- name: Push firmware to website repo for web flasher
# on main branch: push firmware to web installer
- name: Push firmware to website repo for web installer
if: github.ref == 'refs/heads/main'
uses: cpina/github-action-push-to-another-repository@main
env:
Expand All @@ -62,4 +64,4 @@ jobs:
destination-repository-name: 'gdoor-org.github.io'
target-branch: main
user-name: 'github-actions[bot]'
commit-message: 'Latest firmware for web flasher via ORIGIN_COMMIT'
commit-message: 'Latest firmware for web installer via ORIGIN_COMMIT'
2 changes: 1 addition & 1 deletion firmware/esp32/gdoor/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "GDoor",
"version": "dev",
"new_install_prompt_erase": false,
"new_install_prompt_erase": true,
"new_install_improv_wait_time": 0,
"builds": [
{
Expand Down
2 changes: 1 addition & 1 deletion firmware/esp32/gdoor/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ lib_deps =
https://github.com/tzapu/WiFiManager.git
256dpi/MQTT@^2.5.2
extra_scripts =
merge_firmware.py
prepare-web-installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def merge_bin(source, target, env):
)
)

# build web flasher manifest
# build web installer manifest
with open(MANIFEST_JSON, 'r', encoding='utf-8') as json_file:
manifest = json.load(json_file)
manifest["version"] = os.environ.get("GDOOR_VERSION", "dev")
Expand Down

0 comments on commit 5b6d483

Please sign in to comment.