From e2bfcd26c9c9e18c6928e42b7e6de10c31129963 Mon Sep 17 00:00:00 2001
From: CaCO3
Date: Sat, 21 Oct 2023 22:15:47 +0200
Subject: [PATCH] update web installer
---
.github/workflows/{build.yaml => build.yml} | 8 +++++---
.github/workflows/manual-update-webinstaller.yml | 9 +++++----
docs/index.html | 11 ++++++-----
docs/manifest.json | 2 +-
4 files changed, 17 insertions(+), 13 deletions(-)
rename .github/workflows/{build.yaml => build.yml} (97%)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yml
similarity index 97%
rename from .github/workflows/build.yaml
rename to .github/workflows/build.yml
index d7621d51..4be94a7d 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yml
@@ -380,7 +380,7 @@ jobs:
#########################################################################################
## Update the Web Installer on a release
#########################################################################################
-# This is the same as in the update-webinstaller.yml
+# Make sure to also update update-webinstaller.yml!
update-web-installer:
needs: [release]
environment:
@@ -408,12 +408,14 @@ jobs:
- name: Add binary to Web Installer and update manifest
run: |
+ echo "Updating Web installer to use firmware from ${{ steps.last_release.outputs.tag_name }}..."
rm -f docs/binary/firmware.bin
wget https://github.com/jomjol/AI-on-the-edge-device/releases/download/${{ steps.last_release.outputs.tag_name }}/AI-on-the-edge-device__update__${{ steps.last_release.outputs.tag_name }}.zip
unzip AI-on-the-edge-device__update__${{ steps.last_release.outputs.tag_name }}.zip
cp -f firmware.bin docs/binary/firmware.bin
- cp -f docs/manifest_template.json docs/manifest.json
- sed -i 's/VERSION/${{ steps.last_release.outputs.tag_name }}/g' docs/manifest.json
+ echo "Updating index and manifest file..."
+ sed -i 's/$VERSION/${{ steps.last_release.outputs.tag_name }}/g' docs/index.html
+ sed -i 's/$VERSION/${{ steps.last_release.outputs.tag_name }}/g' docs/manifest.json
- name: Setup Pages
uses: actions/configure-pages@v2
diff --git a/.github/workflows/manual-update-webinstaller.yml b/.github/workflows/manual-update-webinstaller.yml
index 87e0768e..c421c951 100644
--- a/.github/workflows/manual-update-webinstaller.yml
+++ b/.github/workflows/manual-update-webinstaller.yml
@@ -1,7 +1,7 @@
# This updates the Web Installer with the files from the docs folder and the binary of the latest release
# it only gets run on:
-# - Changes to the docs folder in the `rolling` branch
-# - On a release
+# - Manually triggered
+# Make sure to also update the lower part of build.yml!
name: Manual Web Installer Update
@@ -45,8 +45,9 @@ jobs:
wget https://github.com/jomjol/AI-on-the-edge-device/releases/download/${{ steps.last_release.outputs.tag_name }}/AI-on-the-edge-device__update__${{ steps.last_release.outputs.tag_name }}.zip
unzip AI-on-the-edge-device__update__${{ steps.last_release.outputs.tag_name }}.zip
cp -f firmware.bin docs/binary/firmware.bin
- echo "Updating manifest file..."
- sed -i 's/VERSION/${{ steps.last_release.outputs.tag_name }}/g' docs/manifest.json
+ echo "Updating index and manifest file..."
+ sed -i 's/$VERSION/${{ steps.last_release.outputs.tag_name }}/g' docs/index.html
+ sed -i 's/$VERSION/${{ steps.last_release.outputs.tag_name }}/g' docs/manifest.json
- name: Setup Pages
uses: actions/configure-pages@v2
diff --git a/docs/index.html b/docs/index.html
index 8c553f6f..26bcd001 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -18,14 +18,15 @@
For further information about AI-on-the-edge-device please go to https://github.com/jomjol/AI-on-the-edge-device.
- Notes:
+ Notes:
- - For the installation, make sure to switch the ESP32 to Bootloader mode!
+ - The Webinstall will install the latest firmware (Version $VERSION).
+ - For the installation, make sure to switch the ESP32 to Bootloader mode by keeping the FLASH button pressed while the RESET button gets relesed. if there is no FLASH button, you need to pull GPIO0 low!
- After the installation, a manual reset might be required!
- - Please note that not all web browsers and operating systems support the necessary USB access!
+ - Please note that not all web browsers and operating systems support the necessary USB access needed for this Webinstaller!
- Check the documentation for additional information.
- - The SD card must still be set up separately. This can be done manually or using the new Remote Setup. See the documentation for further instructions!
-
+ - The SD card can be setup automatically after the firmware got installed. See jomjol.github.io/AI-on-the-edge-device-docs/Installation for details. For this to work, the SD card must be FAT formated (which is the default on a new SD card).
+ Alternatively the SD card still can be setup manually, see the documentation for details!
diff --git a/docs/manifest.json b/docs/manifest.json
index a9cd5ce2..bcf1ab49 100644
--- a/docs/manifest.json
+++ b/docs/manifest.json
@@ -1,6 +1,6 @@
{
"name": "AI-on-the-edge",
- "version": "VERSION",
+ "version": "$VERSION",
"funding_url": "https://www.paypal.com/donate?hosted_button_id=8TRSVYNYKDSWL",
"new_install_prompt_erase": false,
"builds": [