Skip to content

Commit

Permalink
Log GitHub compare link to aid in CHANGELOG summary on version bump (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrini authored Feb 18, 2020
1 parent 23b7dae commit e32f561
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions scripts/preversion.js
Original file line number Diff line number Diff line change
@@ -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}`);

0 comments on commit e32f561

Please sign in to comment.