Skip to content

Commit

Permalink
Merge branch 'main' into cmbc6
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm authored Jun 19, 2024
2 parents e915a6b + 7f3b33e commit 14065bc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/latest_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_submodules():
return sorted(submodules, key=lambda x: x['name'])


def get_release_tags():
def get_release_tags(prefix='v'):
"""
Return list of release tags for current repo, sorted high to low.
Expand All @@ -69,7 +69,7 @@ def get_release_tags():
for line in git_output.splitlines():
# line looks like: "e18f041a0c8d17189f2eae2a32f16e0a7a3f0f1c refs/tags/v0.5.18"
match = re.match(
r'([a-f0-9]+)\s+refs/tags/(v([0-9]+)\.([0-9]+)\.([0-9]+))$', line)
r'([a-f0-9]+)\s+refs/tags/(' + prefix + r'([0-9]+)\.([0-9]+)\.([0-9]+))$', line)
if not match:
# skip malformed release tags
continue
Expand Down Expand Up @@ -118,7 +118,12 @@ def main():

os.chdir(os.path.join(root_path, submodule['path']))

tags = get_release_tags()
version_prefix = 'v'
# aws-crt-java uses FIPS releases of aws-lc
if name == 'aws-lc' and 'aws-crt-java' in root_path:
version_prefix = 'AWS-LC-FIPS-'

tags = get_release_tags(version_prefix)
current_commit = get_current_commit()
current_tag = get_tag_for_commit(tags, current_commit)
sync_from = current_tag['version'] if current_tag else current_commit
Expand Down

0 comments on commit 14065bc

Please sign in to comment.