Created
May 6, 2014 19:58
-
-
Save Richard-West/2fa5a8728ee4a52da674 to your computer and use it in GitHub Desktop.
Deployment section from a customer Azure deploy.cmd
This file contains hidden or 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
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: Deployment | |
:: ---------- | |
:Deployment | |
echo Handling node.js deployment. | |
:: 2. Select node version | |
call :SelectNodeVersion | |
:: 3. Install npm packages | |
IF EXIST "%DEPLOYMENT_TARGET%\package.json" ( | |
pushd "%DEPLOYMENT_TARGET%" | |
call :ExecuteCmd !NPM_CMD! install --production | |
IF !ERRORLEVEL! NEQ 0 goto error | |
popd | |
) | |
:: 4. Build DocPad Site | |
echo Building the DocPad site | |
pushd %DEPLOYMENT_TARGET% | |
call %DEPLOYMENT_TARGET%\node_modules\.bin\docpad.cmd generate | |
IF !ERRORLEVEL! NEQ 0 goto error | |
:: 1. KuduSync | |
echo KuduSync executing | |
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" ( | |
call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd" | |
IF !ERRORLEVEL! NEQ 0 goto error | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem here is that you still do the
npm installl
on the target path, to make this work you need to runnpm
on the source (or possibly a third intermediate directory) and then kudu sync it to the target.psuedo code: