version: '{branch}-{build}'
image: Visual Studio 2017
install:
- ps: Install-Product node 8.11 x64
cache:
- source/WebApp/node_modules
build_script:
- cmd: >-
    git submodule update --recursive --init

    dotnet restore source/WebApp/WebApp.csproj

    dotnet msbuild source/WebApp/WebApp.csproj /p:Configuration=Release /p:UnbreakablePolicyReportEnabled=false /t:Publish /verbosity:minimal

    powershell -Command "Compress-Archive -Path source/WebApp/bin/publish/* -DestinationPath source/WebApp/bin/publish/WebApp.zip"
artifacts:
- path: source/WebApp/bin/publish/WebApp.zip
  name: WebApp.zip
deploy:
- provider: AzureAppServiceZipDeploy
  website: sharplab-edge
  username: ashmind
  password:
    secure: RqELB/5//3XmjRFiWCwP3A==
  artifact: WebApp.zip
  on:
    branch: edge
version: '{branch}-{build}'
image: Visual Studio 2017
environment:
  NODE_ENV: production
install:
- ps: Install-Product node 8.11 x64
cache:
- source/WebApp/node_modules
build_script:
- cmd: >-
    git submodule update --recursive --init

    dotnet restore source/WebApp/WebApp.csproj

    dotnet msbuild source/WebApp/WebApp.csproj /p:Configuration=Release /p:UnbreakablePolicyReportEnabled=false /t:Publish /verbosity:minimal

    powershell -Command "Compress-Archive -Path source/WebApp/bin/publish/* -DestinationPath source/WebApp/bin/publish/WebApp.zip"
artifacts:
- path: source/WebApp/bin/publish/WebApp.zip
  name: WebApp.zip
deploy:
- provider: AzureAppServiceZipDeploy
  website: sharplab-edge
  username: ashmind
  password:
    secure: RqELB/5//3XmjRFiWCwP3A==
  artifact: WebApp.zip
  on:
    branch: edge
Switch NODE_ENV to production when on AppVeyor.
Switch NODE_ENV to production when on AppVeyor.
