extract Version from define
Some checks failed
Test compiling project / test (push) Failing after 1m33s

This commit is contained in:
2025-02-15 16:03:32 +01:00
parent 10b34c3fd4
commit 33fdae3fb2
6 changed files with 45 additions and 29 deletions

View File

@@ -25,7 +25,8 @@ jobs:
run: ls -lah .pio/build/ESP32_INA233/ .pio/build/ESP32_INA226/
- name: Upload firmware binary for INA233
run: |
VERSION=$(cat version)
VERSION=$(sed -n 's/#define current_version Version{[[:space:]]*\([0-9]\+\),[[:space:]]*\([0-9]\+\),[[:space:]]*\([0-9]\+\)}/\1.\2.\3/p' src/global_data/defines.h)
echo "Extracted version: $VERSION"
curl -X PUT \
-H "Content-Type: application/octet-stream" \
@@ -34,7 +35,8 @@ jobs:
- name: Upload firmware binary for INA226
run: |
VERSION=$(cat version)
VERSION=$(sed -n 's/#define current_version Version{[[:space:]]*\([0-9]\+\),[[:space:]]*\([0-9]\+\),[[:space:]]*\([0-9]\+\)}/\1.\2.\3/p' src/global_data/defines.h)
echo "Extracted version: $VERSION"
curl -X PUT \
-H "Content-Type: application/octet-stream" \