Skip to content

Commit

Permalink
Instructions for local execution
Browse files Browse the repository at this point in the history
  • Loading branch information
pkendall64 committed Sep 6, 2023
1 parent 03caec4 commit 9f0ff05
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ To build the distribution for stuffing on a web server
npm run dist
```
# Firmware
To actually test the code you will need a firmware folder in the same directory as `index.html` and friends.
The firmware folder, with all it's acoutrements can be downloaded from the ExpressLRS github repository.
1. Browse to `https://github.com/ExpressLRS/ExpressLRS/actions/workflows/build.yml?query=branch%3A3.x.x-maintenance+`
2. Find the latest `3.x.x-maintenance` build, and click on that build
3. At the bottom of the page you will find `firmware`, this is the firmware zip that you need to download
4. For development, unzip `firmware.zip` in the root folder, next to this `README.md` file.
5. For deployment, unzip `firmware.zip` in the same folder as `index.html`.
To actually test the code you will need a firmware folder at the root of the project.
The firmware folder, with all it's accoutrements can be downloaded from the ExpressLRS artifact repository by
executing the `get_artifacts.sh` command. This will download all the release artifacts and put all the versions
into the `index.js` file for testing locally.
When committing you changes, you will note that there is a comment above where the versions were placed in the
`index.js` file telling you not to commit changes to that line. So it is very important to revert the changes
to the `versions` line before committing you changes.
16 changes: 16 additions & 0 deletions get_artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
mkdir -p firmware
cd firmware
curl -L -o index.json https://artifactory.expresslrs.org/ExpressLRS/index.json
for i in `cat index.json | jq '.tags | keys[]' | grep -v -- -RC | sed 's/"//g' | sort -r` ; do
HASH=`grep \"$i\" index.json | sed 's/.* "//' | sed 's/".*//'`
curl -L -o firmware.zip "https://artifactory.expresslrs.org/ExpressLRS/$HASH/firmware.zip"
unzip firmware.zip
rm firmware.zip
mv firmware $i
VERSIONS=$VERSIONS", '$i'"
done
rm -f index.json
VERSIONS=`echo $VERSIONS|sed 's/, //'`
sed -i~ "s/\'@VERSIONS@\'/$VERSIONS/" ../src/js/index.js
rm ../src/js/index.js~
2 changes: 2 additions & 0 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { SwalMUI, Toast } from './swalmui.js'
import FileSaver from 'file-saver'
import mui from 'muicss'

// DO NOT COMMIT CHANGES TO THE FOLLOWING LINE!!!
const versions = ['@VERSIONS@']
//
const versionSelect = _('version')
const flashMode = _('flash-mode')
const flashButton = _('flashButton')
Expand Down

0 comments on commit 9f0ff05

Please sign in to comment.