Skip to content

Instantly share code, notes, and snippets.

@glenasmith
Created June 2, 2015 20:00
Show Gist options
  • Save glenasmith/11a0f589b4833d0360f6 to your computer and use it in GitHub Desktop.
Save glenasmith/11a0f589b4833d0360f6 to your computer and use it in GitHub Desktop.
An extract of a customised deploy.cmd for running Gulp tasks during Azure deploys
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------
:: << Other steps from your file omitted here >>
:: 3. Install npm packages (remove the --production switch!)
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
pushd "%DEPLOYMENT_TARGET%"
call :ExecuteCmd !NPM_CMD! install
IF !ERRORLEVEL! NEQ 0 goto error
popd
)
:: 4. Install bower packages
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
pushd "%DEPLOYMENT_TARGET%"
call :ExecuteCmd .\node_modules\.bin\bower install
IF !ERRORLEVEL! NEQ 0 goto error
popd
)
:: 5. Run gulp transformations
IF EXIST "%DEPLOYMENT_TARGET%\gulpfile.js" (
pushd "%DEPLOYMENT_TARGET%"
call :ExecuteCmd .\node_modules\.bin\gulp
IF !ERRORLEVEL! NEQ 0 goto error
popd
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment