Skip to content

Commit 2d75cf2

Browse files
authored
Merge pull request #99 from dhalbert/no-alpha-beta-in-bundle
Exclude releases that are not x.x.x
2 parents dfbec17 + 0340627 commit 2d75cf2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adabot/circuitpython_bundle.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ def update_bundle(bundle_path):
145145
working_directory = os.path.abspath(os.getcwd())
146146
os.chdir(bundle_path)
147147
git.submodule("foreach", "git", "fetch")
148+
# Regular release tags are 'x.x.x'. Exclude tags that are alpha or beta releases.
149+
# They will contain a '-' in the tag, such as '3.0.0-beta.5'.
150+
# --exclude must be before --tags.
148151
# sh fails to find the subcommand so we use subprocess.
149-
subprocess.run(shlex.split("git submodule foreach 'git checkout -q `git rev-list --tags --max-count=1`'"), stdout=subprocess.DEVNULL)
152+
subprocess.run(shlex.split("git submodule foreach 'git checkout -q `git rev-list --exclude='*-*' --tags --max-count=1`'"), stdout=subprocess.DEVNULL)
150153
status = StringIO()
151154
result = git.status("--short", _out=status)
152155
updates = []

0 commit comments

Comments
 (0)