os: Visual Studio 2015

environment:
  nodejs_version: "10"

install:
  - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
  - rustup-init -yv --default-host x86_64-pc-windows-msvc
  - set PATH=%PATH%;%USERPROFILE%\.cargo\bin
  - ps: Install-Product node $env:nodejs_version
  - npm run ensure-tooling

build_script:
  - cd cb_browser_ui
  - npm install --no-save
  - cd ..
  - npm run build-browser
  - npm run build-server-bundle
  - for /f %%x in ('type .version') do ren "target\\release\\citybound.exe" "citybound-%%x-windows.exe"
  - for /f %%x in ('type .version') do appveyor PushArtifact "target\\release\\citybound-%%x-windows.exe"

deploy:
  provider: S3
  access_key_id:
    secure: mL0OPBsnoPN2itWv55Uvm6nGA1uQHC5K2TwLK4YUO6U=
  secret_access_key:
    secure: T0ZM2/QozQ/Vp68aO+kJljg01S+tvoih6MjQMv7U0Mrl2uDdt5oKsMh2FsruJ8Fx
  bucket: citybound-livebuilds
  region: us-east-1
  folder: /