Skip to content

Commit c2dfe7b

Browse files
committed
Reduce size of error when release cannot be announced
1 parent 2d45745 commit c2dfe7b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

scripts/announceRelease.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,17 @@ const createJoplinReleasePost = async (release) => {
7171
}
7272

7373
const announceRelease = async () => {
74-
const release = await getLatestRelease();
74+
try {
75+
const release = await getLatestRelease();
7576

76-
const githubReleaseUrl = await createGithubRelease(release);
77-
console.log("GitHub release created at", githubReleaseUrl);
77+
const githubReleaseUrl = await createGithubRelease(release);
78+
console.log("GitHub release created at", githubReleaseUrl);
7879

79-
const discoursePostUrl = await createJoplinReleasePost(release);
80-
console.log("Discourse post created at", discoursePostUrl);
80+
const discoursePostUrl = await createJoplinReleasePost(release);
81+
console.log("Discourse post created at", discoursePostUrl);
82+
} catch (error) {
83+
console.error('Could not announce release on forum: ' + error.message);
84+
}
8185
}
8286

8387
announceRelease();

0 commit comments

Comments
 (0)