sudo: false
language: node_js
node_js: stable
install:
  - npm install -g bower grunt-cli
  - npm install phantomjs-prebuilt
  - npm install
  - bower install
  - gem install compass
  - bower list
  - npm list
script:
  - grunt test
  - grunt build
  - SCRIPTS_FN=`ls dist/scripts/scripts*.js`
  - sed "s/WENFO_GOOGLE_MAPS_API_KEY/$GOOGLE_MAPS_API_KEY/g" < $SCRIPTS_FN > tmp
  - mv tmp $SCRIPTS_FN
deploy:
  # deploy to "wenfo.org/staging/aus-env" on branch master
  - skip_cleanup: true
    provider: script
    script: bash -c "cd dist && find . -type f -exec curl -u $FTP_USER:$FTP_PASSWORD --ftp-create-dirs -T {} ftp.wenfo.org/staging/{} \;"
    on:
      branch: master
  # deploy to "wenfo.org/aus-env" on branch production
  - skip_cleanup: true
    provider: script
    script: bash -c "cd dist && find . -type f -exec curl -u $FTP_USER:$FTP_PASSWORD --ftp-create-dirs -T {} ftp.wenfo.org{} \;"
    on:
      branch: production
notifications:
  email: false
  slack:
    rooms: wenfo:N1YfzQWaJ8wfjvrYarrh33PZ
    on_success: always

sudo: false
language: node_js
node_js: 7
install:
  - npm install -g bower grunt-cli
  - npm install phantomjs-prebuilt
  - npm install
  - bower install
  - gem install compass
  - bower list
  - npm list
script:
  - grunt test
  - grunt build
  - SCRIPTS_FN=`ls dist/scripts/scripts*.js`
  - sed "s/WENFO_GOOGLE_MAPS_API_KEY/$GOOGLE_MAPS_API_KEY/g" < $SCRIPTS_FN > tmp
  - mv tmp $SCRIPTS_FN
deploy:
  # deploy to "wenfo.org/staging/aus-env" on branch master
  - skip_cleanup: true
    provider: script
    script: bash -c "cd dist && find . -type f -exec curl -u $FTP_USER:$FTP_PASSWORD --ftp-create-dirs -T {} ftp.wenfo.org/staging/{} \;"
    on:
      branch: master
  # deploy to "wenfo.org/aus-env" on branch production
  - skip_cleanup: true
    provider: script
    script: bash -c "cd dist && find . -type f -exec curl -u $FTP_USER:$FTP_PASSWORD --ftp-create-dirs -T {} ftp.wenfo.org{} \;"
    on:
      branch: production
notifications:
  email: false
  slack:
    rooms: wenfo:N1YfzQWaJ8wfjvrYarrh33PZ
    on_success: always

Revert to older nodejs for builds
Revert to older nodejs for builds
