environment:
  node_pre_gyp_accessKeyId:
    secure: 7DrSVc5eIGtmMcki5H+iRft+Tk3MJTwDBQEUuJHWaQ4=
  node_pre_gyp_secretAccessKey:
    secure: 1amwJJw9fu0j6dXnc5KsAQbSYf7Cjw/dapT6OZWABa6nc52grkKeLQ+DGaOfQz8i
  matrix:
  - nodejs_version: 0.10

platform:
  - x86

shallow_clone: true

install:
  - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:Platform
  - node -e "console.log('node version ' + process.version + ' architecture ' + process.arch);"
  - node --version
  - npm --version
  - SET PATH=c:\python27;%PATH%
  - SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH%
  - SET PATH=%APPDATA%\npm;%PATH%
  # add local node-pre-gyp dir to path
  - SET PATH=node_modules\.bin;%PATH%
  # # work around old npm problem with ^
  - npm install npm -g
  - npm --version
  # upgrade node-gyp to ensure it knows about msvs 2013
  - npm install node-gyp
  - npm install --build-from-source  --msvs_version=2013
  - npm test
  - node-pre-gyp package
  - SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
  - ECHO commit message %CM%
  - if not "%CM%" == "%CM:[publish binary]=%" node-pre-gyp publish

build: off
test: off
deploy: off