Skip to content

Commit

Permalink
feat(release): open github tag in browser to update changelog after p…
Browse files Browse the repository at this point in the history
…ublishing
  • Loading branch information
christopherthielen committed Jan 30, 2018
1 parent 91402de commit 9f202e9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"find-parent-dir": "^0.3.0",
"git-semver-tags": "^1.2.1",
"npm-run-all": "^4.1.1",
"open": "^0.0.5",
"readline-sync": "^1.4.7",
"shelljs": "^0.7.8",
"shx": "^0.2.2",
Expand Down
7 changes: 5 additions & 2 deletions release.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require('./util').packageDir();
require('shelljs/global');
const open = require('open');

const readlineSync = require('readline-sync');
const shelljs = require('shelljs');
Expand Down Expand Up @@ -118,7 +119,8 @@ githuburl = githuburl && githuburl.replace(/^git\+/, '').replace(/\.git$/, '');
if (githuburl) {
if (changelog) {
const haspbcopy = shelljs.exec(`which pbcopy`, true).code === 0;
console.log(`\n\n1) Update the GitHub tag with release notes/CHANGELOG`);
console.log(`\n\n1) Update the GitHub release with the release notes/CHANGELOG`);
console.log(`\n (Make sure you see "\u2714 Existing tag")`);

if (haspbcopy) {
fs.writeFileSync('CHANGELOG.tmp', changelog);
Expand All @@ -129,7 +131,8 @@ if (githuburl) {
console.log('CHANGELOG:\n\n');
console.log(changelog);
}
console.log(`\n${githuburl}/releases/tag/${version}`);
console.log(`\n${githuburl}/releases/edit/${version}`);
open(`${githuburl}/releases/edit/${version}`);
}

console.log(`\n\n2) Check for milestones`);
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,10 @@ once@^1.3.0:
dependencies:
wrappy "1"

open@^0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/open/-/open-0.0.5.tgz#42c3e18ec95466b6bf0dc42f3a2945c3f0cad8fc"

optimist@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
Expand Down

0 comments on commit 9f202e9

Please sign in to comment.