Skip to content

Commit

Permalink
buildrelease-repo.py: fix bug when no refs provided
Browse files Browse the repository at this point in the history
When no ref to build is provided, the script retrieves the current
HEAD's SHA and uses that as release name.

The problem was that using extend() to add the SHA to the list of refs
caused the string to be added as individual chars instead of a single
item. Using append() instead fixes the problem.

Fixes #26386
  • Loading branch information
dregad committed Nov 25, 2019
1 parent 1edfc97 commit 8212eeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildrelease-repo.py
Expand Up @@ -140,7 +140,7 @@ def main():
refs.extend(os.popen('git branch -r').read().split())

if len(refs) < 1:
refs.extend(os.popen('git log --pretty="format:%h" -n1').read())
refs.append(os.popen('git log --pretty="format:%h" -n1').read())

refs = [ref for ref in refs if not ignore(ref)]

Expand Down

0 comments on commit 8212eeb

Please sign in to comment.