Skip to content

Commit

Permalink
Merge branch 'master' into pr/137
Browse files Browse the repository at this point in the history
  • Loading branch information
pkendall64 committed Jul 25, 2024
2 parents d67786a + 8cfadbc commit 7e1b6be
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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: |
Expand All @@ -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/**/*
Expand Down
4 changes: 2 additions & 2 deletions python/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import binary_flash
import binary_configurator

if __name__ == '__main__':
binary_flash.main()
binary_configurator.main()
4 changes: 2 additions & 2 deletions python/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import binary_flash
import binary_configurator

if __name__ == '__main__':
binary_flash.main()
binary_configurator.main()
3 changes: 2 additions & 1 deletion python/binary_flash.py → python/binary_configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 2 additions & 2 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import setuptools
setuptools.setup(
name="binary_flash",
name="flasher",
version="3.3.0",
author="ExpressLRS Team",
author_email="",
Expand All @@ -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=[
Expand Down

0 comments on commit 7e1b6be

Please sign in to comment.