Skip to content

Commit

Permalink
C#: Add fallback for branch detection.
Browse files Browse the repository at this point in the history
Apparently, when building a release build, we're getting `no-git`
as first part o the version string for the submodule.
If we do, fall back to the internal repo's branch name.
For releases, that's the same anyways.
Luckily, the commit SHA is correct.
  • Loading branch information
criemen committed Jun 10, 2024
1 parent 06aa266 commit 027c7d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions csharp/scripts/gen-git-assembly-info.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def options():
gitfiles[file.name] = file

version_string = gitfiles["git-ql-describe-all.log"].read_text().strip()
if version_string == "no-git":
version_string = gitfiles["git-describe-all.log"].read_text().strip()
version_string += f" ({gitfiles['git-ql-rev-parse.log'].read_text().strip()})"

output_file = pathlib.Path(opts.output)
Expand Down

0 comments on commit 027c7d0

Please sign in to comment.