diff --git a/.travis.yml b/.travis.yml index 3ff55429..8ca129ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: node_js node_js: - '8' before_install: +- npm i -g makeshift && makeshift -r https://registry.npmjs.org - npm i -g markdown-to-html - wget https://github.com/github/hub/releases/download/v2.2.9/hub-linux-386-2.2.9.tgz - tar -xvzf hub-linux-386-2.2.9.tgz @@ -18,17 +19,4 @@ branches: - master notifications: slack: - secure: YsSIB1nMQvcgqDsjMcgIkRAPh3LB9xqxW8+237kPVIW2itSUvLr4VQqTcHOOKmG7U2vySQoC7Kcb+lm+8w98xv8OGOe2ikCDaB05ExyONivL0D0gbVEwbdIMuWg72SanIuSXcbDtaFnbn6sCPqHVZpXB3jSd9wKN8YOb0MWz3s1TG0AR0L9DRMrj0K9kGDpIkAqsKO5Tbm4AyXIafzih1gRXldLBvBCR+/W0tvhaPVIhuvNjXGRVs+1kp7daJKtdXDpUWjTx4w64nbr8ljmh50J3rLCdbh4TTlO/TVT3k3RD9IsfwaEeWS6j7/SMXdpT35DFxK1GetCHzJxQcKbMDR9O+6VgQRm24z1456mw4ayf860GtC8oU0+x7b9ndY3KQd6/qoXwFx0ngJN479KVpo5T96zEKkQ1XVCh2Jlx0Zw2iThzH/Ks9G+q7zNIYP3+9US6ogzszZPCHbJzCkllrL4C9FP3LBqSlnS7uon8D9/8RSd0MEA1fTWsF5LBKZdntIo2Ma6QlEB5yelbeP/XUE+AHKveDUCd1b7mq7u6Cnx9z8rS4O++Y3Otd2idITDArfvkncnWiOYTWUlYA/UNeBznZ7u2B7yCzKymp4t1u6Es/Kdh8xhzTVRDSQTKcUinyOitaRLb0vHtivJM2MjaLPeYqL5TudQPHKPuvaAMHjU= -before_deploy: - - PKG_NAME=`node -e "console.log(require('./package.json').name);"` - - PKG_VER=`node -e "console.log(require('./package.json').version);"` - - NPM_VER=`npm show $PKG_NAME version -deploy: - provider: npm - email: "$NPM_EMAIL" - api_key: "$NPM_TOKEN" - on: - branch: master - condition: $NPM_VER != $PKG_VER -after_deploy: - - node /tmp/changelog-generator-slack-notification/index.js --html "$HTML" --name "$PKG_NAME" --api "$SLACK_WEBHOOK" --v "$PKG_VER" + secure: YsSIB1nMQvcgqDsjMcgIkRAPh3LB9xqxW8+237kPVIW2itSUvLr4VQqTcHOOKmG7U2vySQoC7Kcb+lm+8w98xv8OGOe2ikCDaB05ExyONivL0D0gbVEwbdIMuWg72SanIuSXcbDtaFnbn6sCPqHVZpXB3jSd9wKN8YOb0MWz3s1TG0AR0L9DRMrj0K9kGDpIkAqsKO5Tbm4AyXIafzih1gRXldLBvBCR+/W0tvhaPVIhuvNjXGRVs+1kp7daJKtdXDpUWjTx4w64nbr8ljmh50J3rLCdbh4TTlO/TVT3k3RD9IsfwaEeWS6j7/SMXdpT35DFxK1GetCHzJxQcKbMDR9O+6VgQRm24z1456mw4ayf860GtC8oU0+x7b9ndY3KQd6/qoXwFx0ngJN479KVpo5T96zEKkQ1XVCh2Jlx0Zw2iThzH/Ks9G+q7zNIYP3+9US6ogzszZPCHbJzCkllrL4C9FP3LBqSlnS7uon8D9/8RSd0MEA1fTWsF5LBKZdntIo2Ma6QlEB5yelbeP/XUE+AHKveDUCd1b7mq7u6Cnx9z8rS4O++Y3Otd2idITDArfvkncnWiOYTWUlYA/UNeBznZ7u2B7yCzKymp4t1u6Es/Kdh8xhzTVRDSQTKcUinyOitaRLb0vHtivJM2MjaLPeYqL5TudQPHKPuvaAMHjU= \ No newline at end of file diff --git a/npm_version_upgrade.sh b/npm_version_upgrade.sh index fe732a15..77d521e5 100755 --- a/npm_version_upgrade.sh +++ b/npm_version_upgrade.sh @@ -21,6 +21,13 @@ if [ $TRAVIS_BRANCH = "master" ]; then if [[ $retval != 0 ]]; then exit $retval fi + else + npm publish + node /tmp/changelog-generator-slack-notification/index.js --html "$HTML" --name "$PKG_NAME" --api "$SLACK_WEBHOOK" --v "$PKG_VER" fi + + fi + + fi \ No newline at end of file