diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 65af696..7d0195a 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -33,14 +33,17 @@ jobs: mkdir firmware cd firmware curl -L -o index.json https://artifactory.expresslrs.org/ExpressLRS/index.json - for i in 3.0.0 3.0.1 3.1.0 3.1.1 3.1.2 3.2.0 3.2.1 3.3.0 ; do + 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/" ../main*.js - name: Setup Pages if: ${{ github.ref == 'refs/heads/master' }} uses: actions/configure-pages@v1 diff --git a/src/js/index.js b/src/js/index.js index 6c95ebb..a015ecd 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -8,7 +8,7 @@ import { SwalMUI, Toast } from './swalmui.js' import FileSaver from 'file-saver' import mui from 'muicss' -const versions = ['3.3.0', '3.2.1', '3.2.0', '3.1.2', '3.1.1', '3.1.0', '3.0.1', '3.0.0'] +const versions = ['@VERSIONS@'] const versionSelect = _('version') const flashMode = _('flash-mode') const flashButton = _('flashButton')