Skip to content

Commit

Permalink
Merge pull request #8 from jake1164/fetch-submodules-fix
Browse files Browse the repository at this point in the history
Fix for fetch-all-submodules
  • Loading branch information
dhalbert authored Sep 6, 2023
2 parents 3224d94 + 4229b60 commit 65e44ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Examples
========

If you have just a repository with files intended for a CircuitPython board, your release
file could be very simple! This release CI creates .mpy files for CircuitPython 7.2.0:
file could be very simple! This release CI creates .mpy files for CircuitPython 8.2.0:

.. code-block:: yaml
Expand All @@ -55,7 +55,7 @@ file could be very simple! This release CI creates .mpy files for CircuitPython
uses: adafruit/build-mpy@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
circuitpy-tag: "7.2.0"
circuitpy-tag: "8.2.0"
You also have granular control of which directories to compile and zip and the ability to specify which
files should or should not be compiled and/or zipped. For example, if you wanted to compile and zip
Expand All @@ -80,7 +80,7 @@ to specify certain files NOT to compile, you could modify the script above to be
uses: adafruit/build-mpy@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
circuitpy-tag: "7.2.0"
circuitpy-tag: "8.2.0"
mpy-directory: "microcontroller"
mpy-manifest-file: "mpy_manifest.txt"
mpy-manifest-type: "exclude"
Expand Down
11 changes: 10 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,19 @@ runs:
- name: Enter CircuitPython repo, checkout tag, and update
shell: bash
run: |
function version() {
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
}
cd ${{ inputs.circuitpython-repo-name }}
git fetch
git checkout ${{ inputs.circuitpy-tag }}
make fetch-submodules
if [ $(version "${{ inputs.circuitpy-tag }}") -ge $(version "8.2.0") ]; then
make fetch-all-submodules
else
make fetch-submodules
fi
- name: Build mpy-cross
shell: bash
run: |
Expand Down

0 comments on commit 65e44ca

Please sign in to comment.