File tree Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ branch only.
1313### Building Development Versions
1414
1515To build development versions, first you need a configuration file in
16- ` $env:USERPROFILE \sublime-package-dev.json` .
16+ ` ~ \sublime-package-dev.json` .
1717
1818This file must contain the following information:
1919
Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments