Skip to content

Commit da0149f

Browse files
projectgusdpgeorge
authored andcommitted
github: Improve error on "Build mpremote wheel" if fork is missing tags.
Avoids a vague error from the 'vcs' versioning scheme if recent tags haven't been pushed to the fork. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
1 parent 295df7c commit da0149f

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/mpremote.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,17 @@ jobs:
2020
- name: Install build tools
2121
run: pip install build
2222
- name: Build mpremote wheel
23-
run: cd tools/mpremote && python -m build --wheel
23+
run: |
24+
if ! git rev-parse --verify -q v1.23.0 >/dev/null; then
25+
echo "::error::mpremote wheel build requires recent MicroPython version tags in the forked repo."
26+
echo ""
27+
echo "To fix, push tags from upstream:"
28+
echo " git remote add upstream https://github.com/micropython/micropython.git"
29+
echo " git fetch upstream --tags"
30+
echo " git push origin --tags"
31+
exit 1
32+
fi
33+
cd tools/mpremote && python -m build --wheel
2434
- name: Archive mpremote wheel
2535
uses: actions/upload-artifact@v7
2636
with:

0 commit comments

Comments
 (0)