Skip to content

Instantly share code, notes, and snippets.

@morsh
Last active March 29, 2017 14:16
Show Gist options
  • Save morsh/a0c2cf904ce74e28f463afcbdd186f79 to your computer and use it in GitHub Desktop.
Save morsh/a0c2cf904ce74e28f463afcbdd186f79 to your computer and use it in GitHub Desktop.
Deploying yarn using a deployment script
[config]
SCM_COMMAND_IDLE_TIMEOUT=300
command = azure-deploy.cmd
:: 3. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
pushd "%DEPLOYMENT_TARGET%"
:: 1. Yarn Installation
echo Checking yarn installation...
call yarn --version
IF !ERRORLEVEL! NEQ 0 (
echo Installing Yarn...
!NPM_CMD! install -g yarn
IF !ERRORLEVEL! NEQ 0 goto error
) ELSE (
echo Yarn is installed
)
call :ExecuteCmd yarn install
call :ExecuteCmd yarn build
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