From e9395961157a7391d89b9eeab9c5d0b6d4d3de9f Mon Sep 17 00:00:00 2001 From: Gajus Kuizinas Date: Mon, 27 Feb 2017 14:56:33 +0000 Subject: [PATCH] fix: use semantic-release Use a conventional tool to automate semantic relases. --- .gitignore | 1 - .scripts/release.sh | 61 -------- .travis.yml | 3 +- CHANGELOG.md | 358 -------------------------------------------- package.json | 1 + 5 files changed, 2 insertions(+), 422 deletions(-) delete mode 100755 .scripts/release.sh delete mode 100644 CHANGELOG.md diff --git a/.gitignore b/.gitignore index 53641994..e3b55372 100755 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,3 @@ dist !.babelrc !.travis.yml !.README -!.scripts diff --git a/.scripts/release.sh b/.scripts/release.sh deleted file mode 100755 index 68eb40f7..00000000 --- a/.scripts/release.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -set -ex - -if [[ $TRAVIS_PULL_REQUEST != "false" ]]; then - echo 'This is a pull request. Exiting the release script.' - - exit 0 -fi - -if [[ -n $TRAVIS_TAG ]]; then - echo 'This is a tag release.' - - # Use NPM_TOKEN to enable NPM authentication - set +x - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - set -x - - NODE_ENV=development npm install - NODE_ENV=production npm run build - - npm publish - exit 0 -fi - -if [[ $TRAVIS_BRANCH != "master" ]]; then - echo 'This is not a master branch. Exiting the release script.' - - exit 0 -fi - -if [[ $(git log --format=%B -n 1 $TRAVIS_COMMIT) == *"chore: release"* ]]; then - echo 'This is a tag release. Exiting the release script.' - - exit 0 -fi; - -git config --global user.name 'continuous-deployment' -git config --global user.email 'continuous-deployment@travis' - -# Use GITHUB_TOKEN to enable GitHub authentication -git config credential.helper "store --file=.git/credentials" -set +x -echo "https://${GITHUB_TOKEN}:@github.com" > .git/credentials -set -x - -git checkout master -git merge $TRAVIS_COMMIT - -# Generate ./README.md from ./.README/README.md template. -npm run documentation - -git add ./README.md -git diff-index --quiet HEAD ./README.md || git commit --no-verify -m 'docs: update documentation' ./README.md - -# 1. bump the package.json version (based on your commit history) -# 2. update CHANGELOG.md -# 3. commit package.json and CHANGELOG.md -# 4. tag the release -standard-version --no-verify --message "chore: release %s" - -git push --follow-tags origin master diff --git a/.travis.yml b/.travis.yml index 172500f0..ae033358 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,5 @@ script: - npm run test - npm run lint - npm run build - - conventional-changelog-lint --from=HEAD~$(git --no-pager rev-list master..HEAD --count) after_success: - - travis-after-all && ./.scripts/release.sh + - rm -fr ./dist && npm run build && semantic-release pre && npm publish && semantic-release post diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8fde3aec..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,358 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -# [2.30.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.29.1...v2.30.0) (2017-02-24) - - -### Bug Fixes - -* ensure colon is not null in typeColonSpacing reporter (#197) ([1242ab4](https://github.com/gajus/eslint-plugin-flowtype/commit/1242ab4)) -* require-return-type exception ([59bbf3e](https://github.com/gajus/eslint-plugin-flowtype/commit/59bbf3e)) - -### Features - -* `require-return-type` include / exclude filter support ([3f4b947](https://github.com/gajus/eslint-plugin-flowtype/commit/3f4b947)) - - - - -## [2.29.1](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.29.0...v2.29.1) (2016-12-01) - - - - - -# [2.29.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.28.2...v2.29.0) (2016-11-30) - - -### Features - -* support optional Flow names (closes #145) ([c40ad7c](https://github.com/gajus/eslint-plugin-flowtype/commit/c40ad7c)), closes [#145](https://github.com/gajus/eslint-plugin-flowtype/issues/145) - - - - -## [2.28.2](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.28.1...v2.28.2) (2016-11-27) - - - - - -## [2.28.1](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.28.0...v2.28.1) (2016-11-27) - - - - - -# [2.28.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.27.0...v2.28.0) (2016-11-27) - - -### Bug Fixes - -* annotation spell check, better @noflow support ([0fe502b](https://github.com/gajus/eslint-plugin-flowtype/commit/0fe502b)) - -### Features - -* add support carriage return ([d537d85](https://github.com/gajus/eslint-plugin-flowtype/commit/d537d85)) -* allow line break to satisfy trailing space rule ([29a17a8](https://github.com/gajus/eslint-plugin-flowtype/commit/29a17a8)) - - - - -# [2.27.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.26.1...v2.27.0) (2016-11-27) - - -### Features - -* Add excludeVariableMatch option to require-variable-type ([a087fe6](https://github.com/gajus/eslint-plugin-flowtype/commit/a087fe6)) -* Add excludeVariableTypes option to require-variable-type ([35f601f](https://github.com/gajus/eslint-plugin-flowtype/commit/35f601f)) -* Add require-variable-type rule ([3013025](https://github.com/gajus/eslint-plugin-flowtype/commit/3013025)) - - - - -## [2.26.1](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.26.0...v2.26.1) (2016-11-27) - - - - - -# [2.26.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.25.0...v2.26.0) (2016-11-27) - - -### Bug Fixes - -* primitive constructor types regex ([ceea11c](https://github.com/gajus/eslint-plugin-flowtype/commit/ceea11c)) - -### Features - -* add no-primitive-constructor-types rule ([0d37f03](https://github.com/gajus/eslint-plugin-flowtype/commit/0d37f03)) - - - - -# [2.25.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.24.0...v2.25.0) (2016-10-25) - - -### Features - -* Add excludeParameterMatch option to require-parameter-type ([d9cfbbe](https://github.com/gajus/eslint-plugin-flowtype/commit/d9cfbbe)) - - - - -# [2.24.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.23.1...v2.24.0) (2016-10-25) - - -### Features - -* add additional tests for function return types ([795b3a4](https://github.com/gajus/eslint-plugin-flowtype/commit/795b3a4)) - - - - -## [2.23.1](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.23.0...v2.23.1) (2016-10-25) - - -### Bug Fixes - -* Support more properties in object-type-delimiter ([6b0a677](https://github.com/gajus/eslint-plugin-flowtype/commit/6b0a677)) - - - - -# [2.23.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.22.0...v2.23.0) (2016-10-24) - - -### Features - -* add object-type-delimiter rule ([a99721b](https://github.com/gajus/eslint-plugin-flowtype/commit/a99721b)) - - - - -# [2.22.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.21.0...v2.22.0) (2016-10-24) - - -### Features - -* ObjectTypeIndexer in spaceBeforeTypeColon & spaceAfterTypeColon ([82c87c4](https://github.com/gajus/eslint-plugin-flowtype/commit/82c87c4)), closes [#134](https://github.com/gajus/eslint-plugin-flowtype/issues/134) - - - - -# [2.21.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.20.0...v2.21.0) (2016-10-22) - - -### Features - -* Add variance support to spaceBeforeTypeColon & spaceAfterTypeColon ([4a7f87f](https://github.com/gajus/eslint-plugin-flowtype/commit/4a7f87f)), closes [#137](https://github.com/gajus/eslint-plugin-flowtype/issues/137) - - - - -# [2.20.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.19.0...v2.20.0) (2016-10-06) - - -### Features - -* add annotation enforcement option ([dd71ce8](https://github.com/gajus/eslint-plugin-flowtype/commit/dd71ce8)) - - - - -# [2.19.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.18.2...v2.19.0) (2016-09-20) - - -### Bug Fixes - -* parens in TypeCastExpression ([0e0081f](https://github.com/gajus/eslint-plugin-flowtype/commit/0e0081f)) - -### Features - -* add rule `sort-keys` (fixes #104) ([f6b8deb](https://github.com/gajus/eslint-plugin-flowtype/commit/f6b8deb)), closes [#104](https://github.com/gajus/eslint-plugin-flowtype/issues/104) -* check TypeCastExpressions in type colon spacing rules ([98839f0](https://github.com/gajus/eslint-plugin-flowtype/commit/98839f0)) - - - - -## [2.18.2](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.18.1...v2.18.2) (2016-09-18) - - - - - -## [2.18.1](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.18.0...v2.18.1) (2016-09-15) - - - - - -# [2.18.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.17.1...v2.18.0) (2016-09-15) - - -### Features - -* add rule `no-dupe-keys` (fixes #108) (#109) ([6a65de0](https://github.com/gajus/eslint-plugin-flowtype/commit/6a65de0)), closes [#108](https://github.com/gajus/eslint-plugin-flowtype/issues/108) [(#109](https://github.com/(/issues/109) - - - - -## [2.17.1](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.17.0...v2.17.1) (2016-09-12) - - -### Bug Fixes - -* config file (json failing lint) ([eedcac7](https://github.com/gajus/eslint-plugin-flowtype/commit/eedcac7)) -* correct recommended config name ([35150d4](https://github.com/gajus/eslint-plugin-flowtype/commit/35150d4)) -* disable lint for one run ([3745498](https://github.com/gajus/eslint-plugin-flowtype/commit/3745498)) - - - - -# [2.17.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.16.1...v2.17.0) (2016-09-12) - - -### Features - -* define recommended configuration ([dc2e35b](https://github.com/gajus/eslint-plugin-flowtype/commit/dc2e35b)) -* export recommended configuration ([f7d7a21](https://github.com/gajus/eslint-plugin-flowtype/commit/f7d7a21)) - - - - -## [2.16.1](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.16.0...v2.16.1) (2016-09-09) - - - - - -# [2.16.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.15.0...v2.16.0) (2016-09-07) - - -### Bug Fixes - -* `delimiter-dangle` with indexers ([9ff6f37](https://github.com/gajus/eslint-plugin-flowtype/commit/9ff6f37)) -* reported locations in `delimiter-dangle` ([06fbd92](https://github.com/gajus/eslint-plugin-flowtype/commit/06fbd92)) - -### Features - -* add `delimiter-dangle` for trailing commas/semicolons ([788f480](https://github.com/gajus/eslint-plugin-flowtype/commit/788f480)) - - - - -# [2.15.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.14.3...v2.15.0) (2016-09-05) - - -### Features - -* options to prevent specific types in `no-weak-types` (#99) ([9c903ad](https://github.com/gajus/eslint-plugin-flowtype/commit/9c903ad)) - - - - -## [2.14.3](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.14.2...v2.14.3) (2016-09-05) - - -### Bug Fixes - -* ensure not to print private tokens ([1e41818](https://github.com/gajus/eslint-plugin-flowtype/commit/1e41818)) - - - - -## [2.14.2](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.14.1...v2.14.2) (2016-09-05) - - -### Bug Fixes - -* move tag check prior to branch check ([29b35d0](https://github.com/gajus/eslint-plugin-flowtype/commit/29b35d0)) - - - - -## [2.14.1](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.14.0...v2.14.1) (2016-09-05) - - -### Bug Fixes - -* add a condition to prevent empty commit ([2e6ddfa](https://github.com/gajus/eslint-plugin-flowtype/commit/2e6ddfa)) -* fix release script ([260b86b](https://github.com/gajus/eslint-plugin-flowtype/commit/260b86b)) - - - - -# [2.14.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.13.0...v2.14.0) (2016-09-05) - - -### Features - -* add new rule `no-weak-types` (#96) ([c1a94c5](https://github.com/gajus/eslint-plugin-flowtype/commit/c1a94c5)) - - - - -# [2.13.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.12.1...v2.13.0) (2016-09-03) - - -### Features - -* add new rule `boolean-style` (#98) ([1ab7902](https://github.com/gajus/eslint-plugin-flowtype/commit/1ab7902)) - - - - -## [2.12.1](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.12.0...v2.12.1) (2016-09-01) - - -### Bug Fixes - -* allow uppercase sequences in 'type-id-match' (#93) ([000b0d1](https://github.com/gajus/eslint-plugin-flowtype/commit/000b0d1)) - - - - -# [2.12.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.11.5...v2.12.0) (2016-09-01) - - -### Bug Fixes - -* add --no-verify to docs commit ([393643b](https://github.com/gajus/eslint-plugin-flowtype/commit/393643b)) -* add --no-verify to standard-version ([22a0559](https://github.com/gajus/eslint-plugin-flowtype/commit/22a0559)) - -### Features - -* add new rule "semi" for semicolon linting (#95) ([ead974d](https://github.com/gajus/eslint-plugin-flowtype/commit/ead974d)) - - - - -## [2.11.5](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.11.4...v2.11.5) (2016-09-01) - - - - -## [2.11.4](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.11.3...v2.11.4) (2016-08-23) - - - - -## [2.11.3](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.11.2...v2.11.3) (2016-08-23) - - -### Bug Fixes - -* commit documentation changes ([15a8289](https://github.com/gajus/eslint-plugin-flowtype/commit/15a8289)) - - - - -## [2.11.2](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.11.1...v2.11.2) (2016-08-23) - - -### Bug Fixes - -* make release.sh executable ([6fa6f89](https://github.com/gajus/eslint-plugin-flowtype/commit/6fa6f89)) diff --git a/package.json b/package.json index 2a5c4b6c..f204e6de 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "husky": "^0.11.7", "jsonlint": "^1.6.2", "mocha": "^3.0.2", + "semantic-release": "^6.3.2", "standard-version": "^2.4.0", "travis-after-all": "^1.4.4" }