Skip to content

Commit bb69483

Browse files
devversionjelbourn
authored andcommitted
build: publish script should should note where to paste changelog (#15218)
Currently we still cannot cut the Github release automatically because the publish script does not have API access. Though it's sometimes not quite clear for the caretaker what he needs to do manually. In the meanwhile we make this _slighty_ more clear by adding a note that indicates where the release notes should be copy-pasted to.
1 parent f2cb837 commit bb69483

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

tools/release/git/github-urls.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ export function getGithubBranchCommitsUrl(owner: string, repository: string, bra
55

66
/** Gets a Github URL that can be used to create a new release from a given tag. */
77
export function getGithubNewReleaseUrl(options: {owner: string, repository: string,
8-
tagName: string, releaseTitle: string}) {
8+
tagName: string, releaseTitle: string, body: string}) {
99

1010
return `https://github.com/${options.owner}/${options.repository}/releases/new?` +
1111
`tag=${encodeURIComponent(options.tagName)}&` +
12-
`title=${encodeURIComponent(options.releaseTitle)}&`;
12+
`title=${encodeURIComponent(options.releaseTitle)}&` +
13+
`body=${encodeURIComponent(options.body)}`;
1314
}

tools/release/publish-release.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,21 @@ class PublishReleaseTask extends BaseReleaseTask {
126126
repository: this.repositoryName,
127127
tagName: newVersionName,
128128
releaseTitle: releaseTitle,
129+
// TODO: we cannot insert the real changelog here since the URL would become
130+
// way too large and Github would consider this as a malformed page request.
131+
body: 'Copy-paste changelog in here!'
129132
});
130133

131134
console.log();
132135
console.info(green(bold(` ✓ Published all packages successfully`)));
133136

134137
// Always log out of npm after releasing to prevent unintentional changes to
135138
// any packages.
136-
npmLogout();
137-
console.info(green(bold(` ✓ Logged out of npm`)));
139+
if (npmLogout()) {
140+
console.info(green(` ✓ Logged out of npm`));
141+
} else {
142+
console.error(red(` ✘ Could not log out of NPM. Please manually log out!`));
143+
}
138144

139145
console.info(yellow(` ⚠ Please draft a new release of the version on Github.`));
140146
console.info(yellow(` ${newReleaseUrl}`));

0 commit comments

Comments
 (0)