Skip to content

Commit 65e44ca

Browse files
authored
Merge pull request #8 from jake1164/fetch-submodules-fix
Fix for fetch-all-submodules
2 parents 3224d94 + 4229b60 commit 65e44ca

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Examples
3535
========
3636

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

4040
.. code-block:: yaml
4141
@@ -55,7 +55,7 @@ file could be very simple! This release CI creates .mpy files for CircuitPython
5555
uses: adafruit/build-mpy@v1
5656
with:
5757
github-token: ${{ secrets.GITHUB_TOKEN }}
58-
circuitpy-tag: "7.2.0"
58+
circuitpy-tag: "8.2.0"
5959
6060
You also have granular control of which directories to compile and zip and the ability to specify which
6161
files should or should not be compiled and/or zipped. For example, if you wanted to compile and zip
@@ -80,7 +80,7 @@ to specify certain files NOT to compile, you could modify the script above to be
8080
uses: adafruit/build-mpy@v1
8181
with:
8282
github-token: ${{ secrets.GITHUB_TOKEN }}
83-
circuitpy-tag: "7.2.0"
83+
circuitpy-tag: "8.2.0"
8484
mpy-directory: "microcontroller"
8585
mpy-manifest-file: "mpy_manifest.txt"
8686
mpy-manifest-type: "exclude"

action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,19 @@ runs:
8484
- name: Enter CircuitPython repo, checkout tag, and update
8585
shell: bash
8686
run: |
87+
function version() {
88+
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
89+
}
90+
8791
cd ${{ inputs.circuitpython-repo-name }}
8892
git fetch
8993
git checkout ${{ inputs.circuitpy-tag }}
90-
make fetch-submodules
94+
95+
if [ $(version "${{ inputs.circuitpy-tag }}") -ge $(version "8.2.0") ]; then
96+
make fetch-all-submodules
97+
else
98+
make fetch-submodules
99+
fi
91100
- name: Build mpy-cross
92101
shell: bash
93102
run: |

0 commit comments

Comments
 (0)