From a98dc0c604eb822950113dbe2a8a8de6d2c1fe42 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8c37f04..8b9b44a 100644 --- a/package.json +++ b/package.json @@ -28,11 +28,13 @@ }, "scripts": { "build": "rm -rf dist/* && ./node_modules/.bin/babel src/ --out-dir dist/", - "changelog": "github_changelog_generator --bug-labels --enhancement-labels --header-label='# Changelog'", + "changelog": "github_changelog_generator --bug-labels --enhancement-labels --future-release=$npm_config_release --header-label='# Changelog'", "coveralls": "npm run cover && cat ./test/coverage/lcov.info | coveralls", "cover": "NODE_ENV=test nyc mocha $npm_package_options_mocha", "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 build && git add -A && git commit -n -m \"Release $npm_config_release\"", + "test": "mocha $npm_package_options_mocha", + "version": "sed -i '' 's/\\(\"version\": \"\\)'\"$npm_package_version\"'\\(\"\\)/\\1'\"$npm_config_release\"'\\2/' package.json" }, "peerDependencies": { "bookshelf": ">= 0.7"