Skip to content

Commit 30b6e53

Browse files
committed
build: fix build failure when there's no tags in the repo
1 parent 382b6eb commit 30b6e53

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/publish-nupkg.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ if ($(Test-Path ./out) -eq $false) {
1010
rm out/* -Recurse -Force
1111
}
1212
$tag = $(git describe --tags --abbrev=0)
13+
if ([System.String]::IsNullOrWhiteSpace($tag))
14+
{
15+
$tag = "0.0.0.0"
16+
}
1317
$count = $(git rev-list --count HEAD)
1418
$ver = [System.Version]::Parse($tag)
1519

0 commit comments

Comments
 (0)