From c2dd659e7afd23cbdcad029188d50ed0f13a15b9 Mon Sep 17 00:00:00 2001 From: lumapu Date: Tue, 8 Nov 2022 23:34:47 +0100 Subject: [PATCH] workflow update --- .github/workflows/compile_development.yml | 7 +-- tools/esp8266/scripts/getVersion.py | 27 +++++++++- .../scripts/gh-action-dev-build-flash.html | 54 +++++++++++++++++++ 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 tools/esp8266/scripts/gh-action-dev-build-flash.html diff --git a/.github/workflows/compile_development.yml b/.github/workflows/compile_development.yml index 721a946a..a48ed48d 100644 --- a/.github/workflows/compile_development.yml +++ b/.github/workflows/compile_development.yml @@ -71,9 +71,10 @@ jobs: with: name: ${{ steps.rename-binary-files.outputs.name }}_dev_build path: | - tools/*/firmware/* - tools/*/User_Manual.md - tools/*/json/manifest.json + tools/esp8266/*/firmware/* + tools/esp8266/*/User_Manual.md + tools/esp8266/*/index.html + tools/esp8266/*/json/manifest.json #./${{ steps.rename-binary-files.outputs.name }}.zip diff --git a/tools/esp8266/scripts/getVersion.py b/tools/esp8266/scripts/getVersion.py index b977aabe..943286c9 100644 --- a/tools/esp8266/scripts/getVersion.py +++ b/tools/esp8266/scripts/getVersion.py @@ -1,6 +1,30 @@ import os from datetime import date +def genOtaBin(path) + arr = [] + arr.append(1) + arr.append(0) + arr.append(0) + arr.append(0) + for x in range(24): + arr.append(255) + arr.append(154) + arr.append(152) + arr.append(67) + arr.append(71) + for x in range(4064): + arr.append(255) + arr.append(0) + arr.append(0) + arr.append(0) + arr.append(0) + for x in range(4092): + arr.append(255) + with open(path + "ota.bin", "wb") as f: + f.write(bytearray(arr)) + + def readVersion(path, infile): f = open(path + infile, "r") lines = f.readlines() @@ -40,8 +64,9 @@ def readVersion(path, infile): dst = path + "firmware/" os.rename(src + "bootloader.bin", dst + "bootloader.bin") os.rename(src + "partitions.bin", dst + "partitions.bin") + genOtaBin(path + "firmware/") + os.rename("gh-action-dev-build-flash.html", path + "index.html") - #print("::set-output name=name::" + versionnumber[:-1] ) print("name=" + versionnumber[:-1] ) diff --git a/tools/esp8266/scripts/gh-action-dev-build-flash.html b/tools/esp8266/scripts/gh-action-dev-build-flash.html new file mode 100644 index 00000000..9040954e --- /dev/null +++ b/tools/esp8266/scripts/gh-action-dev-build-flash.html @@ -0,0 +1,54 @@ + + + + + + + + + + Flash | AhoyDTU + +
+
+

Development Build (ESP8266 / ESP32)

+

+ +

+

+ Hierzu die Ahoy-Hardware per USB Kabel an den PC stecken und evtl. warten, bis die Treiber installiert sind. Anschließend auf den ensprechenden connect Button klicken. +

+ + + + + + + + + + + + +

Release Build

+

+ Die Release Builds werden auf ahoyDtu.de veröffentlicht. +

+
+
+ + + + +