Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermooo committed Mar 25, 2015
2 parents 2771d0c + 87fbf2e commit 087e130
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ branch only.
### Building Development Versions

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

This file must contain the following information:

Expand Down
48 changes: 48 additions & 0 deletions bin/Publish.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<#
.DESCRIPTION
Publishes to 'master' after deleting dev files.
#>

param([string]$Tag)

throw "not ready for use"

function AbortIfProcessFailed {
param([string]$message)
if ($LASTEXITCODE) { throw $message }
exit $LASTEXITCODE
}

function AbortIfDirtyWorkingDirectory {
if (@(git status --short).Count -ne 0) {
throw "uncommited changes "
exit 1
}
}

function AbortIfGitNotAvailable {
get-command git -erroraction stop > $null
}

$toDelete = @(
"manifest.json",
"tests",
"bin"
)

AbortIfGitNotAvailable
AbortIfDirtyWorkingDirectory

try {
push-location $PSScriptRoot\..

remove-item -recurse $toDelete

write-warning "commit the files, tag and push upstream"
git checkout master
AbortIfProcessFailed "could not checkout branch master"
}
finally {
pop-location
}

0 comments on commit 087e130

Please sign in to comment.