Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 257166d

Browse files
committed
chore(build): fix to commit automatic changes to changelog
1 parent 39b8e4e commit 257166d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
"build": "npm run clean && tsc",
2020
"build-and-test": "npm run build && npm run test",
2121
"changelog": "./node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md -s",
22+
"changelog-and-commit": "npm run changelog && node ./scripts/commit-changelog.js",
2223
"clean": "rimraf ./dist",
2324
"github-release": "node ./scripts/create-github-release.js",
2425
"lint": "tslint -c ./tslint.json --project ./tsconfig.json",
2526
"nightly": "npm run build && node ./scripts/publish-nightly.js",
26-
"release": "npm run build && npm run test && npm run changelog && npm version patch && npm run github-release && npm publish",
27+
"release": "npm run build && npm run test && npm run changelog-and-commit && npm version patch && npm run github-release && npm publish",
2728
"test": "jasmine JASMINE_CONFIG_PATH=src/spec/jasmine.config.json || true",
2829
"watch": "npm run clean && tsc --watch"
2930
},

scripts/commit-changelog.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var execSync = require('child_process').execSync;
2+
3+
function main() {
4+
try {
5+
execSync('git add ./CHANGELOG.md');
6+
execSync('git commit -m "chore(changelog): update changelog for release"');
7+
} catch (ex) {
8+
console.log('Failed to complete commiting changelog - ', ex.message);
9+
process.exit(1);
10+
}
11+
}

0 commit comments

Comments
 (0)