Skip to content

Commit

Permalink
Update travis for my repo
Browse files Browse the repository at this point in the history
* Add packaging release.zip only task to grunt
* Deploy release.zip to github only on release branch
* Cancel gitter notifications
  • Loading branch information
sinsinpub committed Dec 17, 2020
1 parent 679920b commit 8bc5b2a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ before_script:
# DEPLOY TO CHROME WEBSTORE
script:
- export KC3_VERSION=$(node -p -e "require('./package.json').version")
- if [ $TRAVIS_BRANCH == 'webstore' ]; then grunt build; fi
- if [ $TRAVIS_BRANCH == 'webstore' ] || [ $TRAVIS_BRANCH == 'release' ]; then grunt build; fi
- if [ $TRAVIS_BRANCH == 'webstore' ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then grunt webstore; fi
- if [ $TRAVIS_BRANCH == 'release' ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then grunt package; fi

# DEPLOY TO GITHUB RELEASES
before_deploy:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- git tag $KC3_VERSION -a -m "Automated GitHub release for $KC3_VERSION"
- git push -q https://dragonjet:[email protected]/KC3Kai/KC3Kai --tags
- mv build/release.zip build/kc3kai-$KC3_VERSION.zip
- git push -q https://sinsinpub:[email protected]/sinsinpub/KC3Kai --tags
- cp build/release.zip build/kc3kai-$KC3_VERSION.zip
deploy:
provider: releases
skip_cleanup: true
Expand All @@ -37,14 +38,14 @@ deploy:
- build/kc3kai-$KC3_VERSION.zip
on:
tags: false
branch: webstore
branch: release
condition: $TRAVIS_PULL_REQUEST == "false"

# BUILD NOTIFICATION FOR GITTER
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/e8964a721dd35fd96e46
on_success: change
on_failure: change
on_start: never
#notifications:
# webhooks:
# urls:
# - https://webhooks.gitter.im/e/e8964a721dd35fd96e46
# on_success: change
# on_failure: change
# on_start: never
4 changes: 4 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,10 @@ module.exports = function(grunt) {
'qunit'
]);

grunt.registerTask('package', [
'compress:release'
]);

grunt.registerTask('webstore', [
'compress:release',
'webstore_upload:kc3kai'
Expand Down

0 comments on commit 8bc5b2a

Please sign in to comment.