Skip to content

Instantly share code, notes, and snippets.

@freshlogic
Created July 28, 2014 03:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freshlogic/1e9fe62aa0d160a9ef93 to your computer and use it in GitHub Desktop.
Save freshlogic/1e9fe62aa0d160a9ef93 to your computer and use it in GitHub Desktop.
deploy.ps1
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
If (Test-Path "cloud_package.cspkg") {
Remove-Item "cloud_package.cspkg" -Force
}
cd "WebRole"
iex "git reset --hard origin/master"
iex "git pull"
cmd /C "rmdir /S /Q node_modules"
# Fix deployment issue with long paths by installing these modules at the root
iex "npm i lodash@~2.4.1"
if ($LastExitCode -ne 0) { throw "npm i lodash@~2.4.1 failed with exit code $LastExitCode" }
iex "npm i --production"
if ($LastExitCode -ne 0) { throw "npm i --production failed with exit code $LastExitCode" }
iex "npm dedupe"
Publish-AzureServiceProject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment