Skip to content

Commit 9f202e9

Browse files
feat(release): open github tag in browser to update changelog after publishing
1 parent 91402de commit 9f202e9

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"find-parent-dir": "^0.3.0",
3333
"git-semver-tags": "^1.2.1",
3434
"npm-run-all": "^4.1.1",
35+
"open": "^0.0.5",
3536
"readline-sync": "^1.4.7",
3637
"shelljs": "^0.7.8",
3738
"shx": "^0.2.2",

release.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require('./util').packageDir();
44
require('shelljs/global');
5+
const open = require('open');
56

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

123125
if (haspbcopy) {
124126
fs.writeFileSync('CHANGELOG.tmp', changelog);
@@ -129,7 +131,8 @@ if (githuburl) {
129131
console.log('CHANGELOG:\n\n');
130132
console.log(changelog);
131133
}
132-
console.log(`\n${githuburl}/releases/tag/${version}`);
134+
console.log(`\n${githuburl}/releases/edit/${version}`);
135+
open(`${githuburl}/releases/edit/${version}`);
133136
}
134137

135138
console.log(`\n\n2) Check for milestones`);

yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,10 @@ once@^1.3.0:
826826
dependencies:
827827
wrappy "1"
828828

829+
open@^0.0.5:
830+
version "0.0.5"
831+
resolved "https://registry.yarnpkg.com/open/-/open-0.0.5.tgz#42c3e18ec95466b6bf0dc42f3a2945c3f0cad8fc"
832+
829833
optimist@^0.6.1:
830834
version "0.6.1"
831835
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"

0 commit comments

Comments
 (0)