From aff7be25b008b276d1ebff1cf87cb5692eae86ba Mon Sep 17 00:00:00 2001 From: Ricardo Gama Date: Thu, 7 Jul 2016 15:38:23 +0100 Subject: [PATCH] Add release script --- package.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f1a9513..f27660b 100644 --- a/package.json +++ b/package.json @@ -28,12 +28,14 @@ "mocha": "--compilers js:babel-register --bail test" }, "scripts": { - "build": "rm -rf dist/* && ./node_modules/.bin/babel src/ --out-dir dist/", - "changelog": "github_changelog_generator --bug-labels --enhancement-labels --header-label='# Changelog'", - "coveralls": "npm run cover && cat ./test/coverage/lcov.info | coveralls", + "changelog": "github_changelog_generator --bug-labels --enhancement-labels --future-release=$npm_config_release --header-label='# Changelog'", "cover": "babel-node node_modules/isparta/bin/isparta cover $npm_package_options_isparta _mocha -- $npm_package_options_mocha", + "coveralls": "npm run cover && cat ./test/coverage/lcov.info | coveralls", "lint": "git diff --cached --name-only --diff-filter=ACMRTUXB | grep -E '\\.(js)(\\..+)?$' | xargs eslint", - "test": "mocha $npm_package_options_mocha" + "release": "npm run changelog && npm run version && npm run transpile && git add -A && git commit -n -m \"Release $npm_config_release\"", + "test": "mocha $npm_package_options_mocha", + "transpile": "rm -rf dist/* && ./node_modules/.bin/babel src/ --out-dir dist/", + "version": "sed -i '' 's/\\(\"version\": \"\\)'\"$npm_package_version\"'\\(\"\\)/\\1'\"$npm_config_release\"'\\2/' package.json" }, "dependencies": { "babel-runtime": "6.11.6"