-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3c0fb9
commit 29b2824
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!env node | ||
if(require.main === module && process.argv[2]) | ||
branch = process.argv[2]; | ||
|
||
require('./util').ensureCleanMaster(branch); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!env node | ||
"use strict"; | ||
|
||
require('shelljs/global'); | ||
let readlineSync = require('readline-sync'); | ||
let util = require('./util'); | ||
let _exec = util._exec; | ||
|
||
let version = require('../package.json').version; | ||
|
||
if (!readlineSync.keyInYN('Did you bump the version number in package.json?')) { | ||
process.exit(1); | ||
} | ||
|
||
if (!readlineSync.keyInYN('Did you update CHANGELOG.md using scripts/update_changelog.js?')) { | ||
process.exit(1); | ||
} | ||
|
||
if (!readlineSync.keyInYN('Did you push all changes back to origin?')) { | ||
process.exit(1); | ||
} | ||
|
||
if (!readlineSync.keyInYN('Ready to publish?')) { | ||
process.exit(1); | ||
} | ||
|
||
util.ensureCleanMaster('master'); | ||
_exec(`npm run build`); | ||
_exec(`npm publish`); | ||
_exec(`git tag ${version}`); | ||
_exec(`git push origin ${version}`); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!env node | ||
"use strict"; | ||
let conventionalChangelog = require('conventional-changelog'); | ||
|
||
let options = { | ||
preset: 'ui-router-core' | ||
}; | ||
|
||
if(require.main === module) { | ||
let context, gitOpts; | ||
|
||
if (process.argv[2]) { | ||
context = {}; | ||
gitOpts = {}; | ||
context.previousTag = process.argv[2]; | ||
gitOpts.from = process.argv[2]; | ||
} | ||
|
||
if (process.argv[3]) { | ||
context.currentTag = process.argv[3]; | ||
} | ||
|
||
showChangelog(context, gitOpts); | ||
} | ||
|
||
function showChangelog(context, gitOpts) { | ||
var writerOpts = { doFlush: true, generateOn: function() { return false; } }; | ||
conventionalChangelog(options, context, gitOpts, undefined, writerOpts).pipe(process.stdout); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!env node | ||
"use strict"; | ||
|
||
require('shelljs/global'); | ||
let path = require('path'); | ||
let _exec = require('./util')._exec; | ||
|
||
cd(path.resolve(__dirname, '..')); | ||
|
||
echo('Updating CHANGELOG...'); | ||
cp('CHANGELOG.md', 'CHANGELOG.bak'); | ||
_exec('node ./scripts/show_changelog.js >> CHANGELOG.new'); | ||
_exec('cat CHANGELOG.new CHANGELOG.bak > CHANGELOG.md'); | ||
rm('CHANGELOG.bak', 'CHANGELOG.new'); |