Remove GitHub action, add shell script. Replaced links to be independent from GitHub
This commit is contained in:
parent
eab668d5eb
commit
5dd6c73e11
16 changed files with 82 additions and 52 deletions
.github/workflows
firmware_v3
build-btclock_rev_b-213epd
btclock_rev_b_213epd.binbtclock_rev_b_213epd.bin.sha256btclock_rev_b_213epd_firmware.binbtclock_rev_b_213epd_firmware.bin.sha256littlefs.binlittlefs.bin.sha256
build-lolin_s3_mini-213epd
build-lolin_s3_mini-29epd
commit.txtdate.txttag.txt
24
.github/workflows/deploy.yml
vendored
24
.github/workflows/deploy.yml
vendored
|
@ -1,24 +0,0 @@
|
||||||
name: Deploy GitHub Pages
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main # Change this to your default branch
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
pages: write # to deploy to Pages
|
|
||||||
id-token: write # to verify the deployment originates from an appropriate source
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
lfs: true # Fetch LFS files
|
|
||||||
- uses: actions/upload-pages-artifact@v3
|
|
||||||
with:
|
|
||||||
path: .
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
id: deployment
|
|
||||||
uses: actions/deploy-pages@v4
|
|
Binary file not shown.
|
@ -1 +1 @@
|
||||||
b5fd18f57493fad76699a6f0a7f2f82babfbd7816e0822d50fb34f1b0a4da16d
|
b1e6aa8a5bf4931863d20bb173d264cfcfb195a06f2defb28d7e2b43bf8750a9
|
||||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
||||||
46340fb52da96a22298b58c9c112da3a3e387490dbc0938e196d2df56f0013be
|
53ddc6bedd3539d7f4c9b572ad0f61fe66555e6014f598c579460a4f75162f6e
|
||||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
||||||
371c78772431f4e8ef49a0c8c532e125bc7f3d39e0180d9b7131750e2ebc3d11
|
50d287c2ecb1bd67aa5c1f3059ec3f4fba246ba73f302c6a29eb1e299b1040c5
|
||||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
||||||
2a322c86089651ca6e14d0a35ff617698c3815d4bc4e72b35d93348822fe0f8b
|
50d287c2ecb1bd67aa5c1f3059ec3f4fba246ba73f302c6a29eb1e299b1040c5
|
||||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
||||||
750d53aa3fa15ac401c3c223040f1a7c3e70475aaef913707e5f344b92cb3830
|
50d287c2ecb1bd67aa5c1f3059ec3f4fba246ba73f302c6a29eb1e299b1040c5
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1ccd5f18fbd5f427c6edd6ca641ed132211e223b
|
3b47c81cfe06028fdc12e583e4d36b23b710a2b9
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
2024-11-25T23:03:00Z
|
2024-11-26T20:08:54Z
|
||||||
|
|
1
firmware_v3/tag.txt
Normal file
1
firmware_v3/tag.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
3.2.11
|
57
get_latest.sh
Executable file
57
get_latest.sh
Executable file
|
@ -0,0 +1,57 @@
|
||||||
|
# Fetch the latest release data
|
||||||
|
release_data=$(curl -s "https://git.btclock.dev/api/v1/repos/btclock/btclock_v3/releases" | jq '.[0]')
|
||||||
|
|
||||||
|
# Extract and write published_at date
|
||||||
|
echo $release_data | jq -r '.published_at' > firmware_v3/date.txt
|
||||||
|
|
||||||
|
# Get the tag name
|
||||||
|
tag_name=$(echo $release_data | jq -r '.tag_name')
|
||||||
|
|
||||||
|
# Fetch the commit hash from the tag's API endpoint
|
||||||
|
commit_hash=$(curl -s "https://git.btclock.dev/api/v1/repos/btclock/btclock_v3/tags/$tag_name" | jq -r '.commit.sha')
|
||||||
|
|
||||||
|
# Write the commit hash to commit.sh
|
||||||
|
echo $commit_hash > firmware_v3/commit.txt
|
||||||
|
echo $tag_name > firmware_v3/tag.txt
|
||||||
|
|
||||||
|
# Download and distribute littlefs files
|
||||||
|
littlefs_url=$(echo $release_data | jq -r '.assets[] | select(.name=="littlefs.bin") | .browser_download_url')
|
||||||
|
littlefs_sha_url=$(echo $release_data | jq -r '.assets[] | select(.name=="littlefs.bin.sha256") | .browser_download_url')
|
||||||
|
|
||||||
|
for dir in firmware_v3/build-btclock_rev_b_213epd firmware_v3/build-lolin_s3_mini_29epd firmware_v3/build-lolin_s3_mini_213epd; do
|
||||||
|
curl -sL $littlefs_url -o "$dir/littlefs.bin"
|
||||||
|
curl -sL $littlefs_sha_url -o "$dir/littlefs.bin.sha256"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Function to download and distribute board-specific files
|
||||||
|
download_board_files() {
|
||||||
|
local board=$1
|
||||||
|
local dir=$2
|
||||||
|
local files=("${@:3}")
|
||||||
|
|
||||||
|
for file in "${files[@]}"; do
|
||||||
|
url=$(echo $release_data | jq -r ".assets[] | select(.name==\"$file\") | .browser_download_url")
|
||||||
|
curl -sL -o "$dir/$file" $url
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Download btclock_rev_b_213epd files
|
||||||
|
download_board_files "btclock_rev_b_213epd" "firmware_v3/build-btclock_rev_b_213epd" \
|
||||||
|
"btclock_rev_b_213epd.bin" \
|
||||||
|
"btclock_rev_b_213epd.bin.sha256" \
|
||||||
|
"btclock_rev_b_213epd_firmware.bin" \
|
||||||
|
"btclock_rev_b_213epd_firmware.bin.sha256"
|
||||||
|
|
||||||
|
# Download lolin_s3_mini_29epd files
|
||||||
|
download_board_files "lolin_s3_mini_29epd" "firmware_v3/build-lolin_s3_mini_29epd" \
|
||||||
|
"lolin_s3_mini_29epd.bin" \
|
||||||
|
"lolin_s3_mini_29epd.bin.sha256" \
|
||||||
|
"lolin_s3_mini_29epd_firmware.bin" \
|
||||||
|
"lolin_s3_mini_29epd_firmware.bin.sha256"
|
||||||
|
|
||||||
|
# Download lolin_s3_mini_213epd files
|
||||||
|
download_board_files "lolin_s3_mini_213epd" "firmware_v3/build-lolin_s3_mini_213epd" \
|
||||||
|
"lolin_s3_mini_213epd.bin" \
|
||||||
|
"lolin_s3_mini_213epd.bin.sha256" \
|
||||||
|
"lolin_s3_mini_213epd_firmware.bin" \
|
||||||
|
"lolin_s3_mini_213epd_firmware.bin.sha256"
|
38
index.html
38
index.html
|
@ -8,8 +8,6 @@
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<meta name="color-scheme" content="dark light" />
|
<meta name="color-scheme" content="dark light" />
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
|
||||||
/* antonio-latin-400-normal */
|
/* antonio-latin-400-normal */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Antonio';
|
font-family: 'Antonio';
|
||||||
|
@ -134,9 +132,10 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h1>BTClock Web Installer</h1>
|
<h1>BTClock Web Installer</h1>
|
||||||
<!-- V3 start -->
|
<!-- V3 start -->
|
||||||
<h2>Version 3</h2>
|
<h2>Version <span id="version">3</span></h2>
|
||||||
<h3>2.13 inch displays (rev. A)</h3>
|
<h3>2.13 inch displays (rev. A)</h3>
|
||||||
<p><small>In most cases you have this version. All versions before block #841273 (2024-04-28) are rev. A.</small></p>
|
<p><small>In most cases you have this version. All versions before block #841273 (2024-04-28) are rev. A.</small>
|
||||||
|
</p>
|
||||||
<esp-web-install-button manifest="manifest_btclock_v3_213.json">
|
<esp-web-install-button manifest="manifest_btclock_v3_213.json">
|
||||||
<i slot="unsupported">
|
<i slot="unsupported">
|
||||||
The flasher is not available because your browser does not support Web
|
The flasher is not available because your browser does not support Web
|
||||||
|
@ -146,7 +145,8 @@
|
||||||
<slot name="activate">Install using multiple parts</slot>
|
<slot name="activate">Install using multiple parts</slot>
|
||||||
</esp-web-install-button>
|
</esp-web-install-button>
|
||||||
<h3>2.13 inch displays (rev. B)</h3>
|
<h3>2.13 inch displays (rev. B)</h3>
|
||||||
<p><small>First released on block #841273 (2024-04-28). If on the back it shows rev. B below the block hash, and you have a BOOT button next to the RESET button you have rev. B.</small></p>
|
<p><small>First released on block #841273 (2024-04-28). If on the back it shows rev. B below the block hash, and you
|
||||||
|
have a BOOT button next to the RESET button you have rev. B.</small></p>
|
||||||
|
|
||||||
<esp-web-install-button manifest="manifest_btclock_v3_213_revb.json">
|
<esp-web-install-button manifest="manifest_btclock_v3_213_revb.json">
|
||||||
<i slot="unsupported">
|
<i slot="unsupported">
|
||||||
|
@ -158,7 +158,8 @@
|
||||||
<slot name="activate">Install using multiple parts</slot>
|
<slot name="activate">Install using multiple parts</slot>
|
||||||
</esp-web-install-button>
|
</esp-web-install-button>
|
||||||
<h4>2.9 inch displays (custom, experimental)</h4>
|
<h4>2.9 inch displays (custom, experimental)</h4>
|
||||||
<p><small>Offered as a courtesy, if you have the kit or bought it pre-built, you need the 2.13 inch version.</small></p>
|
<p><small>Offered as a courtesy, if you have the kit or bought it pre-built, you need the 2.13 inch version.</small>
|
||||||
|
</p>
|
||||||
<esp-web-install-button manifest="manifest_btclock_v3_29.json">
|
<esp-web-install-button manifest="manifest_btclock_v3_29.json">
|
||||||
<i slot="unsupported">
|
<i slot="unsupported">
|
||||||
The flasher is not available because your browser does not support Web
|
The flasher is not available because your browser does not support Web
|
||||||
|
@ -170,25 +171,27 @@
|
||||||
|
|
||||||
</esp-web-install-button>
|
</esp-web-install-button>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://git.rof.tools/mirrors/btclock_v3/src/branch/main/.github/workflows/tagging.yml">GitHub action compiling the
|
<li><a href="https://git.btclock.dev/btclock/btclock_v3/src/branch/main/.forgejo/workflows/push.yaml">CI script
|
||||||
|
compiling the
|
||||||
V3
|
V3
|
||||||
firmware</a></li>
|
firmware</a></li>
|
||||||
<li><a href="https://git.rof.tools/mirrors/btclock_v3/releases">Release to be flashed</a><br>
|
<li><a href="https://git.btclock.dev/btclock/btclock_v3/releases/latest">Release to be flashed</a><br>
|
||||||
<code id="commitHashV3"></code> / <code id="buildDateV3"></code>
|
<code id="commitHashV3"></code> / <code id="buildDateV3"></code>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="https://git.rof.tools/mirrors/btclock_v3">V3 Source</a></li>
|
<li><a href="https://git.btclock.dev/btclock/btclock_v3">V3 Source</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- V3 end -->
|
<!-- V3 end -->
|
||||||
<hr>
|
<hr>
|
||||||
<h3>Verify, don't trust</h2>
|
<h3>Verify, don't trust</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://git.rof.tools/mirrors/btclock-web-flasher">Source code of this website</a></li>
|
<li><a href="https://git.btclock.dev/btclock/web-flasher">Source code of this website</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p>When you are building it yourself, the first time you have to put the S3 mini in to boot mode: Press both side buttons at the same time
|
<p>When you are building it yourself, the first time you have to put the S3 mini in to boot mode: Press both side
|
||||||
|
buttons at the same time
|
||||||
(RST/BOOT),
|
(RST/BOOT),
|
||||||
then first release the RST button and then the boot button.</p>
|
then first release the RST button and then the boot button.</p>
|
||||||
|
|
||||||
|
@ -231,17 +234,10 @@
|
||||||
document.querySelector(".not-supported-i").classList.remove("hidden");
|
document.querySelector(".not-supported-i").classList.remove("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch("firmware/commit.txt")
|
fetch("firmware_v3/tag.txt")
|
||||||
.then(response => response.text())
|
.then(response => response.text())
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
document.getElementById('commitHash').innerHTML = response;
|
document.getElementById('version').innerHTML = response;
|
||||||
})
|
|
||||||
.catch(err => console.log(err))
|
|
||||||
|
|
||||||
fetch("firmware/date.txt")
|
|
||||||
.then(response => response.text())
|
|
||||||
.then((response) => {
|
|
||||||
document.getElementById('buildDate').innerHTML = new Date(response.trim()).toLocaleString();
|
|
||||||
})
|
})
|
||||||
.catch(err => console.log(err))
|
.catch(err => console.log(err))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue