Skip to content

Commit

Permalink
Allow the version to be specified in version.txt instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Jan 23, 2025
1 parent d398142 commit 7e5ed1f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions eng/build/Build.Website.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@ await GetAuthorsContents().ToListAsync()
jsonVersions[i == versions.Length - 1 ? "current" : version.Name] = new JsonVersion(
version.Changelog is { } changelog
? GetVersionFromChangelog(changelog)
: Git($"describe --tags --abbrev=0", version.Path)
.First(x => x.Type == OutputType.Std)
.Text.Trim(),
: File.Exists(version.Path / "version.txt")
? File.ReadAllText(version.Path / "version.txt")
: Git($"describe --tags --abbrev=0", version.Path)
.First(x => x.Type == OutputType.Std)
.Text.Trim(),
i == versions.Length - 1 ? version.Name : null
);
}
Expand Down

0 comments on commit 7e5ed1f

Please sign in to comment.