Adafruit_CircuitPython_Bundle
Adafruit_CircuitPython_Bundle copied to clipboard
Finding latest release assumes latest tag is on master
I believe the current way of finding the latest tag in update-submodules.sh will find the latest tag on any branch, not just on master. For libraries, we never tag other than on master, but some day, we might. (We tag on branches in https://github.com/adafruit/circuitpython, for instance.)
For many suggestions about finding the latest tag on a branch, see https://stackoverflow.com/questions/1404796/how-to-get-the-latest-tag-name-in-current-branch-in-git
Would changing
git submodule foreach "tag=\$(git rev-list --exclude='*-*' --tags --max-count=1); git checkout -q \$tag"
to
git submodule foreach "tag=\$(git rev-list --exclude='*-*' --tags --branches='main|master' --max-count=1); git checkout -q \$tag"
help with this?
It should theoretically restrict the tag search to main or master. I can't think of definitive way to test it.