<commit_before>language: node_js
node_js:
- "6"
before_install:
- npm install -g grunt-cli

# ENVIRONMENT VARIABLES: CHROME WEBSTORE CREDENTIALS
env:
  global:
  - secure: <KEY>
  - secure: <KEY>
  - secure: <KEY>

# BUILD WEBSTORE PACKAGE
before_script:
- npm test

# DEPLOY TO CHROME WEBSTORE
script:
- if [ $TRAVIS_BRANCH == 'webstore' ]; then grunt build; fi
- if [ $TRAVIS_BRANCH == 'webstore' ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then export KC3_VERSION=$(node -p -e "require('./package.json').version") && grunt webstore; fi
- if [ $TRAVIS_BRANCH == 'dev-crx' ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then export KC3_VERSION=$(node -p -e "require('./package.json').version") && grunt build && grunt compress:release; fi

# DEPLOY TO GITHUB RELEASES
before_deploy:
  - git config --global user.email "<EMAIL>"
  - git config --global user.name "Travis CI"
  - git tag $KC3_VERSION -a -m "Automated GitHub release for $KC3_VERSION"
  - git push -q https://dragonjet:$GITHUB_API_KEY@github.com/KC3Kai/KC3Kai --tags
  - cp build/release.zip build/kc3kai-$KC3_VERSION.crx
  - mv build/release.zip build/kc3kai-$KC3_VERSION.zip
deploy:
  provider: releases
  skip_cleanup: true
  api_key: $GITHUB_API_KEY
  file:
    - build/kc3kai-$KC3_VERSION.zip
  on:
    tags: false
    branch: dev-crx
    condition: $TRAVIS_PULL_REQUEST == "false"

# BUILD NOTIFICATION FOR GITTER
notifications:<commit_msg>CRX: apply to webstore branch, remove dev-crx yml<commit_after>language: node_js
node_js:
- "6"
before_install:
- npm install -g grunt-cli

# ENVIRONMENT VARIABLES: CHROME WEBSTORE CREDENTIALS
env:
  global:
  - secure: <KEY>
  - secure: <KEY>
  - secure: ccwwpdxdUpufkFqQUWGdCQAF1TI+Nx1TDVHCIaRM8IdoBU0wc6XD7HEEqq9gNeB3GG5tvPYzwLfj9ARpEiO+KZObLCcaEI5ZKSXPNADzL05fmL8uUDQENR7q+K1iSe5lpE+iBWH1/SHUxUbIzIY1qlaA9+qoKZzzai6JQXEKdzE=

# BUILD WEBSTORE PACKAGE
before_script:
- npm test

# DEPLOY TO CHROME WEBSTORE
script:
- if [ $TRAVIS_BRANCH == 'webstore' ]; then grunt build; fi
- if [ $TRAVIS_BRANCH == 'webstore' ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then export KC3_VERSION=$(node -p -e "require('./package.json').version") && grunt webstore; fi

# DEPLOY TO GITHUB RELEASES
before_deploy:
  - git config --global user.email "<EMAIL>"
  - git config --global user.name "<NAME>"
  - git tag $KC3_VERSION -a -m "Automated GitHub release for $KC3_VERSION"
  - git push -q https://dragonjet:$GITHUB_API_KEY@github.com/KC3Kai/KC3Kai --tags
  - mv build/release.zip build/kc3kai-$KC3_VERSION.zip
deploy:
  provider: releases
  skip_cleanup: true
  api_key: $GITHUB_API_KEY
  file:
    - build/kc3kai-$KC3_VERSION.zip
  on:
    tags: false
    branch: webstore
    condition: $TRAVIS_PULL_REQUEST == "false"

# BUILD NOTIFICATION FOR GITTER
notifications:
{'fraction_non_alphanumeric': 0.12654097171863668, 'fraction_numerical': 0.01595358955765047, 'mean_word_length': 4.245247148288973, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1137452', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1131, 'n_words': 244}