From e32f56174a70703faf88f9aac3bead4609b21eca Mon Sep 17 00:00:00 2001 From: Drini Cami Date: Tue, 18 Feb 2020 13:21:10 -0500 Subject: [PATCH] Log GitHub compare link to aid in CHANGELOG summary on version bump (#193) --- package.json | 2 +- scripts/preversion.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 scripts/preversion.js diff --git a/package.json b/package.json index 5800ca808..64acf589b 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "testPathIgnorePatterns": ["tests/e2e"] }, "scripts": { - "preversion": "npm run test", + "preversion": "npm run test && node scripts/preversion.js", "version": "node scripts/version.js", "postversion": "node scripts/postversion.js", "build": "npx webpack && npx sass ./src/css/BookReader.scss > ./BookReader/BookReader.css", diff --git a/scripts/preversion.js b/scripts/preversion.js new file mode 100644 index 000000000..4f1aa1cfc --- /dev/null +++ b/scripts/preversion.js @@ -0,0 +1,4 @@ +const { version: OLD_VERSION } = require('../package.json'); +const GITHUB_DIFF_URL = `https://github.com/internetarchive/bookreader/compare/v${OLD_VERSION}...master` + +console.log(`Here's what's changed since the last version: ${GITHUB_DIFF_URL}`);