Skip to content

Commit

Permalink
Avoid pulling tag contents into computed version name (#4621)
Browse files Browse the repository at this point in the history
Doing a `git show` on a signed tag will output the full tag message,
*even if* `--format` was specified asking for limited information.

Avoid this by making sure to run on the commit pointed to by the tag,
instead of the tag itself.
  • Loading branch information
msullivan committed Nov 3, 2022
1 parent 0c7b77f commit f92efd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion edb/buildmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def get_version_from_scm(root: pathlib.Path) -> str:
ver = f'{incremented_ver}.dev{commits_on_branch}'

proc = subprocess.run(
['git', 'rev-parse', '--verify', '--quiet', 'HEAD'],
['git', 'rev-parse', '--verify', '--quiet', 'HEAD^{commit}'],
stdout=subprocess.PIPE,
universal_newlines=True,
check=True,
Expand Down

0 comments on commit f92efd4

Please sign in to comment.