Expand release-information to include git tags#26
Merged
olehermanse merged 1 commit intocfengine:mainfrom Mar 16, 2026
Merged
Conversation
Ticket: ENT-13778
olehermanse
reviewed
Mar 16, 2026
Comment on lines
+51
to
+62
| for line in output.splitlines(): | ||
| ref = line.split()[1] | ||
| tag = ref.split("refs/tags/")[1] | ||
| if re.fullmatch(TAG_REGEX, tag): | ||
| sha = ( | ||
| subprocess.check_output( | ||
| ["git", "log", "-n", "1", "--format=%H", tag], cwd=repo_path | ||
| ) | ||
| .decode() | ||
| .strip() | ||
| ) | ||
| tag_map[tag] = sha |
Member
There was a problem hiding this comment.
The purpose of using git show-ref --tags was to eliminate these unnecessary subprocesses, I made a mistake when showing you the command, this is the correct version of it;
git show-ref --tags -d
With that command, you get all the information you need in just 1 process instead of having to call git log again and again;
bac5b9cd69d91179eca01f2af9ebae16a4eb29d7 refs/tags/3.27.0
4c3834d679d5f03adc8a853f8481680ade44dd5a refs/tags/3.27.0^{}
The lines ending with ^{} have the correct commit SHA for that version.
olehermanse
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: ENT-13778