From d8e03c53c3f650b21af5f2397f973f1db9e78ba7 Mon Sep 17 00:00:00 2001 From: Andrew Plummer Date: Wed, 26 Feb 2020 22:28:11 +0000 Subject: [PATCH] Script and dependencies for versioning --- .npmrc | 1 + changelog_template.hbs | 28 ++++++++++++++++++++++++++++ package.json | 7 ++++++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .npmrc create mode 100644 changelog_template.hbs diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..9555e17 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +tag-version-prefix="" diff --git a/changelog_template.hbs b/changelog_template.hbs new file mode 100644 index 0000000..830ea1e --- /dev/null +++ b/changelog_template.hbs @@ -0,0 +1,28 @@ +### Changelog + +{{#each releases}} + {{#if href}} + ###{{#unless major}}#{{/unless}} [{{title}}]({{href}}) + {{else}} + #### {{title}} + {{/if}} + + {{#if tag}} + > {{niceDate}} + {{/if}} + + {{#if summary}} + {{summary}} + {{/if}} + + {{#each merges}} + - {{message}}{{#if href}} [`#{{id}}`]({{href}}){{/if}} + {{/each}} + {{#each fixes}} + - {{commit.subject}}{{#each fixes}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}{{/each}} + {{/each}} + {{#each commits}} + - {{#if breaking}}**Breaking change:** {{/if}}{{subject}}{{#if href}} [`{{shorthash}}`]({{href}}){{/if}} + {{/each}} + +{{/each}} \ No newline at end of file diff --git a/package.json b/package.json index 23a2b24..346e588 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,11 @@ { "name": "sops-secretsmanager-cdk", + "version": "0.0.0", "scripts": { "postinstall": "npm run tsc && npm run get-sops", "get-sops": "wget https://github.com/mozilla/sops/releases/download/v3.5.0/sops-v3.5.0.linux -O ./provider/sops && chmod a+x ./provider/sops", - "tsc": "tsc" + "tsc": "tsc", + "version": "auto-changelog --template ./changelog_template.hbs -p && git add CHANGELOG.md" }, "dependencies": { "@types/node": ">=10" @@ -18,5 +20,8 @@ "@aws-cdk/core": "^1.21.1", "@aws-cdk/custom-resources": "^1.21.1", "@aws-cdk/aws-cloudformation": "^1.21.1" + }, + "devDependencies": { + "auto-changelog": "^1.16.2" } }