Skip to content

Commit

Permalink
Merge branch 'rolling' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
caco3 authored Jan 29, 2023
2 parents c595b40 + 57dc023 commit feb058c
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 45 deletions.
37 changes: 16 additions & 21 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ jobs:
zip -r ../release/AI-on-the-edge-device__manual-setup__${{ steps.vars.outputs.branch }}.zip .
# create AI-on-the-edge-device__remote-setup__*.zip like "AI-on-the-edge-device__remote-setup__v13.0.5.zip"
cd ../manual_setup
cd ../remote_setup
zip -r ../release/AI-on-the-edge-device__remote-setup__${{ steps.vars.outputs.branch }}.zip .
# extract the version used in next step
Expand Down Expand Up @@ -363,9 +363,8 @@ jobs:
#########################################################################################
## Update the Web Installer on a release
#########################################################################################
update-web-installer:
needs: [release]

# This is the same as in the update-webinstaller.yml
update-web-installer:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -380,27 +379,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Update update cache on every commit
uses: actions/[email protected]

- name: Get version of last release
id: last_release
uses: InsonusK/[email protected]
with:
path: update
key: update-${{ github.run_id }}
restore-keys: update # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache

- name: Set Variables
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "branch=$(echo ${{ github.ref_name }} | tr / __)" >> $GITHUB_OUTPUT
myToken: ${{ github.token }}
exclude_types: "release"
view_top: 1

- name: Add binary to Web Installer and update manifest
run: |
rm -f docs/binary/firmware.bin
cp -f update/firmware.bin 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.vars.outputs.branch }}/g' docs/manifest.json
sed -i 's/VERSION/${{ steps.last_release.outputs.tag_name }}/g' docs/manifest.json
- name: Setup Pages
uses: actions/configure-pages@v2

Expand All @@ -411,4 +406,4 @@ jobs:

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v1
61 changes: 61 additions & 0 deletions .github/workflows/update-webinstaller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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

name: Update Web Installer

on:
repository_dispatch: # Run on manual trigger
# push:
# branches:
# - rolling
# paths:
# - docs # The path filter somehow does not work, so lets run it on every change to rolling

jobs:
update-web-installer:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get version of last release
id: last_release
uses: InsonusK/[email protected]
with:
myToken: ${{ github.token }}
exclude_types: "release"
view_top: 1

- name: Add binary to Web Installer and update manifest
run: |
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
- name: Setup Pages
uses: actions/configure-pages@v2

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'docs'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

8 changes: 2 additions & 6 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ Improve **u**ser e**x**perience
5. Now you can reboot.

If anything breaks you can try to
1\. Call `http://<IP>/ota?task=update&file=firmware.bin` resp. `http://<IP>/ota?task=update&file=html.zip` if the upload successed but the extraction failed.
1\. Use the initial_esp32_setup.zip ( <https://github.com/jomjol/AI-on-the-edge-device/wiki/Installation> ) as alternative.
1. Call `http://<IP>/ota?task=update&file=firmware.bin` resp. `http://<IP>/ota?task=update&file=html.zip` if the upload successed but the extraction failed.
1. Use the initial_esp32_setup.zip ( <https://github.com/jomjol/AI-on-the-edge-device/wiki/Installation> ) as alternative.

### Added

Expand Down Expand Up @@ -804,12 +804,8 @@ External Illumination

- Initial Version

[Unreleased]: https://github.com/jomjol/AI-on-the-edge-device/compare/14.0.0-RC2...HEAD

[14.0.0-RC2]: https://github.com/jomjol/AI-on-the-edge-device/compare/13.0.8...14.0.0-RC2

[14.0.0-RC1]: https://github.com/jomjol/AI-on-the-edge-device/compare/13.0.8...14.0.0-RC1

[13.0.8]: https://github.com/jomjol/AI-on-the-edge-device/compare/12.0.1...13.0.8

[13.0.7]: https://github.com/jomjol/AI-on-the-edge-device/compare/12.0.1...13.0.7
Expand Down
19 changes: 7 additions & 12 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@
<title>AI on the Edge Device - Webinstaller</title>
<link rel="icon" href="https://raw.githubusercontent.com/jomjol/AI-on-the-edge-device/master/images/icon/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script
type="module"
src="https://unpkg.com/[email protected]/dist/web/install-button.js?module"
></script>
<body style="
padding: 20px;
padding-left: 60px;
padding-right: 60px;
">
<script type="module" src="https://unpkg.com/[email protected]/dist/web/install-button.js?module"></script>
<body style="padding: 20px; padding-left: 60px; padding-right: 60px;">

<table>
<tr>
Expand All @@ -22,15 +15,17 @@
<hr>

<p>This page provides the Webinstaller and a live USB Console to your AI-on-the-edge-device.<br>
For further information about AI-on-the-edge-device please go to <a href=https://github.com/jomjol/AI-on-the-edge-device>https://github.com/jomjol/AI-on-the-edge-device</a>.</p>

For further information about AI-on-the-edge-device please go to <a href=https://github.com/jomjol/AI-on-the-edge-device target=_blank>https://github.com/jomjol/AI-on-the-edge-device</a>.</p>

<p>Notes:</p>
<ul>
<li>For the installation, make sure to switch the ESP32 to Bootloader mode!</li>
<li>Beside the firmware, also the SD-Card needs to be flashed. This can be done manually or through an initial simple access point.<br>Instructions see <a href=https://github.com/jomjol/AI-on-the-edge-device/wiki/Installation>Wiki</a>!</li>
<li>After the installation, a manual reset might be required!</li>
<li>Please note that not all webbrowsers and operating systems support the needed access to USB!</li>
<li>Check the <a href=https://github.com/jomjol/AI-on-the-edge-device/wiki/Installation>Wiki</a> for additional information.</li>
<li>Check the <a href=https://jomjol.github.io/AI-on-the-edge-device-docs/Installation target=_blank>documentation</a> for additional information.</li>
<li>The SD-Card still must be setup separately. This can be done manually or using the new <b>Remote Setup</b>. See the <a href=https://jomjol.github.io/AI-on-the-edge-device-docs/Installation/#sd-card target=_blank>documentation</a> for further instructions!</li>

</ul>

<p><esp-web-install-button manifest="manifest.json"></esp-web-install-button></p>
Expand Down
12 changes: 6 additions & 6 deletions sd-card/html/ota_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ <h2>OTA Update</h2>

<h3>Update</h3>
On the <a href="https://github.com/jomjol/AI-on-the-edge-device/releases" target=_blank>Release Page</a>, pick the <i><span style="font-family:monospace">AI-on-the-edge-device__update__*.zip</span></i> file!</p>
<p>Alternatively the following file formats are supported (Make sure the file extention is lower case):</p>
<p>Alternatively the following file types are supported:</p>
<ul>
<li><span style="font-family:monospace">*.zip</span> &rarr; Gets unpacked on the SD-Card (most top folder)</li>
<li><span style="font-family:monospace">*.bin</span> &rarr; gets installed onto the ESP32</li>
<li><span style="font-family:monospace">*.bin</span> &rarr; gets installed onto the ESP32s program flash</li>
<li><span style="font-family:monospace">*.tfl/tflite</span> &rarr; Gets copied to your <i>SD-Card/config</i></li>
</ul>

Expand Down Expand Up @@ -108,10 +108,10 @@ <h3><span id="status">Status: idle</span></h3>
* - firmware__*.bin
* - *.ftl
* - *.tflite */
if ( /(^AI-on-the-edge-device__update__)[a-z0-9()_\-.]*(\.zip$)/.test(filename) || // OK
( /(^AI-on-the-edge-device__firmware)[a-z0-9()_\-.]*(\.bin$)/.test(filename)) ||
( /[a-z0-9()_\-.]*(\.tfl$)/.test(filename)) ||
( /[a-z0-9()_\-.]*(\.tflite$)/.test(filename))) {
if ( /(^AI-on-the-edge-device__update__)[a-zRC0-9()_\-.]*(\.zip$)/i.test(filename) || // OK
( /(^AI-on-the-edge-device__firmware)[a-zRC0-9()_\-.]*(\.bin$)/i.test(filename)) ||
( /[a-zRC0-9()_\-.]*(\.tfl$)/i.test(filename)) ||
( /[a-zRC0-9()_\-.]*(\.tflite$)/i.test(filename))) {
firework.launch('Great, the filename matches our expectations. You can now press "Upload and install".', 'success', 5000);
}
/* Following filenames are acceptiod but not prefered:
Expand Down

0 comments on commit feb058c

Please sign in to comment.