We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 087e130 + c8124b7 commit 974f7f5Copy full SHA for 974f7f5
bin/Publish.ps1
@@ -5,8 +5,6 @@
5
6
param([string]$Tag)
7
8
-throw "not ready for use"
9
-
10
function AbortIfProcessFailed {
11
param([string]$message)
12
if ($LASTEXITCODE) { throw $message }
@@ -24,6 +22,13 @@ function AbortIfGitNotAvailable {
24
22
get-command git -erroraction stop > $null
25
23
}
26
+function AbortIfNotOnMaster {
+ if (@(git branch | select-string "* master" -simplematch).Count -eq 0) {
27
+ throw "not on 'master' branch"
28
+ exit 1
29
+ }
30
+}
31
+
32
$toDelete = @(
33
"manifest.json",
34
"tests",
@@ -32,6 +37,7 @@ $toDelete = @(
37
38
AbortIfGitNotAvailable
39
AbortIfDirtyWorkingDirectory
40
+AbortIfNotOnMaster
35
41
36
42
try {
43
push-location $PSScriptRoot\..
0 commit comments