Skip to content

Commit 087e130

Browse files
committed
Merge branch 'dev'
2 parents 2771d0c + 87fbf2e commit 087e130

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ branch only.
1313
### Building Development Versions
1414

1515
To build development versions, first you need a configuration file in
16-
`$env:USERPROFILE\sublime-package-dev.json`.
16+
`~\sublime-package-dev.json`.
1717

1818
This file must contain the following information:
1919

bin/Publish.ps1

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<#
2+
.DESCRIPTION
3+
Publishes to 'master' after deleting dev files.
4+
#>
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 }
13+
exit $LASTEXITCODE
14+
}
15+
16+
function AbortIfDirtyWorkingDirectory {
17+
if (@(git status --short).Count -ne 0) {
18+
throw "uncommited changes "
19+
exit 1
20+
}
21+
}
22+
23+
function AbortIfGitNotAvailable {
24+
get-command git -erroraction stop > $null
25+
}
26+
27+
$toDelete = @(
28+
"manifest.json",
29+
"tests",
30+
"bin"
31+
)
32+
33+
AbortIfGitNotAvailable
34+
AbortIfDirtyWorkingDirectory
35+
36+
try {
37+
push-location $PSScriptRoot\..
38+
39+
remove-item -recurse $toDelete
40+
41+
write-warning "commit the files, tag and push upstream"
42+
git checkout master
43+
AbortIfProcessFailed "could not checkout branch master"
44+
}
45+
finally {
46+
pop-location
47+
}
48+

0 commit comments

Comments
 (0)