From cbee9b888cccd2192e6725c7f36e3826becae95b Mon Sep 17 00:00:00 2001 From: Karl-Philipp Wulfert Date: Tue, 28 May 2019 16:00:51 +0200 Subject: [PATCH] feat: automatically generate changelog after version bump Fixes #23 --- package.json | 2 ++ src/common.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/package.json b/package.json index 001afc50..90c50dce 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "documentation": "typedoc --includeDeclarations --excludeExternals --mode modules --out docs src", "install": "node lib/cli.js -p $INIT_CWD || true", "prepublishOnly": "npm ci && npm run build", + "postversion": "npm run changelog && git push && git push origin \"v$npm_package_version\"", + "preversion": "npm run prepublishOnly", "test": "echo \"Error: no test specified\" && exit 1", "tslint": "tslint -p tsconfig.json -c tslint.json 'src/**/*.ts'" }, diff --git a/src/common.ts b/src/common.ts index ddffd018..efc7d786 100644 --- a/src/common.ts +++ b/src/common.ts @@ -682,6 +682,8 @@ export function getRules(configuration: Configuration): Rules { /* tslint:disable-next-line:max-line-length */ changelog: 'conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m \'docs: update changelog\'', 'check-configuration': 'openstapps-configuration', + postversion: 'npm run changelog && git push && git push origin "v$npm_package_version"', + preversion: 'npm run prepublishOnly', tslint: 'tslint -p tsconfig.json -c tslint.json \'src/**/*.ts\'', };