mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 12:57:47 +00:00
* [release] Add scripts for changelog and diff * Remove publish docs since it in the wiki * Add support for windows
19 lines
481 B
JavaScript
19 lines
481 B
JavaScript
const { execSync } = require('child_process');
|
|
|
|
const commit = execSync('git log --pretty=format:"%s %H"')
|
|
.toString()
|
|
.trim()
|
|
.split('\n')
|
|
.find(line => line.startsWith('Publish '))
|
|
.split(' ')
|
|
.pop();
|
|
|
|
if (!commit) {
|
|
throw new Error('Unable to find last publish commit');
|
|
}
|
|
|
|
const log = execSync(`git log --pretty=format:"- %s [%an]" ${commit}...HEAD`).toString().trim();
|
|
|
|
console.log(`Changes since the last publish commit ${commit}:`);
|
|
console.log(`\n${log}\n`);
|