From 0d3587638169176b94b793b510246e9763631e9b Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Sat, 20 Jul 2024 17:07:05 +1200 Subject: [PATCH 1/4] Rename flasher file used by configurator --- python/{binary_flash.py => binary_configurator.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename python/{binary_flash.py => binary_configurator.py} (100%) diff --git a/python/binary_flash.py b/python/binary_configurator.py similarity index 100% rename from python/binary_flash.py rename to python/binary_configurator.py From 3df4d3fb7f7931a8e132068b95153f95fc8eb2f6 Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Sun, 21 Jul 2024 14:51:27 +1200 Subject: [PATCH 2/4] Fix missed files used to build the binary flasher --- python/__init__.py | 4 ++-- python/__main__.py | 4 ++-- python/setup.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/__init__.py b/python/__init__.py index 955a3736..64fc5087 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -1,4 +1,4 @@ -import binary_flash +import binary_configurator if __name__ == '__main__': - binary_flash.main() + binary_configurator.main() diff --git a/python/__main__.py b/python/__main__.py index 955a3736..64fc5087 100644 --- a/python/__main__.py +++ b/python/__main__.py @@ -1,4 +1,4 @@ -import binary_flash +import binary_configurator if __name__ == '__main__': - binary_flash.main() + binary_configurator.main() diff --git a/python/setup.py b/python/setup.py index a3bbc500..e4330432 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,6 +1,6 @@ import setuptools setuptools.setup( - name="binary_flash", + name="flasher", version="3.3.0", author="ExpressLRS Team", author_email="", @@ -11,7 +11,7 @@ packages=['.'] + setuptools.find_packages(), include_package_data=True, entry_points={ - "console_scripts": ["flash=binary_flash:main"], + "console_scripts": ["flash=binary_configurator:main"], }, install_requires=['pyserial'], classifiers=[ From f81cf2c8af3de91f860fb3f468d79004d84acc6e Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Sun, 21 Jul 2024 21:08:53 +1200 Subject: [PATCH 3/4] Add missing extraction of platform --- python/binary_configurator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/binary_configurator.py b/python/binary_configurator.py index a93fb2f8..932b66d1 100644 --- a/python/binary_configurator.py +++ b/python/binary_configurator.py @@ -244,7 +244,8 @@ def main(): with open('hardware/targets.json') as f: targets = json.load(f) - mcu = MCUType.ESP8266 if targets[vendor][hardware][target]['platform'] == "esp8285" else MCUType.ESP32 + args.platform = targets[vendor][hardware][target]['platform'] + mcu = MCUType.ESP8266 if args.platform == "esp8285" else MCUType.ESP32 if args.file is None: srcdir = targets[vendor][hardware][target]['firmware'] From 8d7f3c972cd55115a9773fe6cf07142760d9981f Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Mon, 22 Jul 2024 08:22:29 +1200 Subject: [PATCH 4/4] Github workflow updates --- .github/workflows/artifacts.yml | 2 +- .github/workflows/build.yml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 4fa8bb04..faebdb74 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4735b1bf..da74ea84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: targets: ${{ steps.set-targets.outputs.targets }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - id: set-targets run: echo "targets=[$(grep -r "\[env:" targets | sed 's/.*://' | sed s/.$// | egrep "UART" | tr '\n' ',' | sed 's/,$/"\n/' | sed 's/,/","/'g | sed 's/^/"/')]" >> $GITHUB_OUTPUT @@ -24,15 +24,15 @@ jobs: uses: rlespinasse/github-slug-action@v4 - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.target }} @@ -44,7 +44,7 @@ jobs: pip install wheel - name: Cache PlatformIO - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.platformio key: ${{ runner.os }}-platformio @@ -59,9 +59,9 @@ jobs: cp -r hardware ~/artifacts/firmware - name: Store Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: firmware + name: temp-${{ matrix.target }} path: | ~/artifacts/**/*.bin ~/artifacts/**/*.json @@ -72,20 +72,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Get firmware artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: firmware path: dist + merge-multiple: true - name: Build flasher "binary" with shiv run: | @@ -94,7 +94,7 @@ jobs: shiv -c flash -o ../dist/firmware/flasher.pyz pyserial . - name: Update firmware artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: firmware path: dist/**/*