Skip to content

Commit 8351b76

Browse files
committed
fix script
1 parent 87fbf2e commit 8351b76

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bin/Publish.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
param([string]$Tag)
77

8-
throw "not ready for use"
9-
108
function AbortIfProcessFailed {
119
param([string]$message)
1210
if ($LASTEXITCODE) { throw $message }
@@ -24,6 +22,13 @@ function AbortIfGitNotAvailable {
2422
get-command git -erroraction stop > $null
2523
}
2624

25+
function AbortIfNotOnMaster {
26+
if (@(git branch | select-string "* master" -simplematch).Count -eq 0) {
27+
throw "not on 'master' branch"
28+
exit 1
29+
}
30+
}
31+
2732
$toDelete = @(
2833
"manifest.json",
2934
"tests",

0 commit comments

Comments
 (0)