Skip to content

Commit

Permalink
fixes generateBuildProperties.ps1 to work with lightweighted tags. (#487
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vuqtran88 authored Mar 5, 2021
1 parent 700d6b5 commit 6e0a236
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/generateBuildProperties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Param(
New-Item -ItemType Directory -Force -Path $outputPath

function getVersionFromTag([string] $tagPrefix, [switch] $excludeCommitCount) {
$GitLatestTagVersion = git describe --match "$tagPrefix[0-9]*" --abbrev=0 HEAD
$GitLatestTagVersion = git describe --tags --match "$tagPrefix[0-9]*" --abbrev=0 HEAD
$GitGitLatestTagVersionSanitized = $GitLatestTagVersion.Replace($tagPrefix,'')
$GitCommitCount = git rev-list "$GitLatestTagVersion..$GitBranchName" --count HEAD
$GitVersion = "$GitGitLatestTagVersionSanitized.$GitCommitCount"
Expand Down

0 comments on commit 6e0a236

Please sign in to comment.