Created
July 28, 2014 03:30
-
-
Save freshlogic/1e9fe62aa0d160a9ef93 to your computer and use it in GitHub Desktop.
deploy.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. (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