Skip to content

Commit

Permalink
github: use main branch for latest if no tags
Browse files Browse the repository at this point in the history
This fails if there are no tags. Fall back to main branch.
  • Loading branch information
jnikula committed Oct 22, 2024
1 parent 98a5c49 commit dfe9657
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ def main():
args = parser.parse_args()

if args.latest:
print(git_tags()[-1])
tags = git_tags()
if tags:
print(tags[-1])
else:
print('main')
return

refs = []
Expand Down

0 comments on commit dfe9657

Please sign in to comment.