Skip to content

Commit a4e1e58

Browse files
gingidpwatrous
authored andcommitted
Fixes publish script
1 parent 5223879 commit a4e1e58

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

desktop/scripts/publish/publish.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { exec } from "child_process";
22
import "colors";
33
import * as fs from "fs";
44
import * as path from "path";
5-
import { ask } from "yesno";
5+
import * as yesno from "yesno";
66
import {
77
createIssue, createPullRequest, getMilestone, githubToken, listMilestoneIssues, listPullRequests,
88
} from "./github-api";
@@ -79,16 +79,15 @@ function getMilestoneId() {
7979
}
8080

8181
async function confirmVersion(version: string): Promise<void> {
82-
return new Promise((resolve, reject) => {
83-
ask(`Up program to be version ${version} (From milestone title) [Y/n]`, true, (ok) => {
84-
if (ok) {
85-
success(`A new release for version ${version} will be prepared`);
86-
resolve(null);
87-
} else {
88-
reject(new Error("milestone version wasn't confirmed. Please change milestone title"));
89-
}
90-
});
82+
const ok = await yesno({
83+
question: `Bump to version ${version} (From milestone title) [Y/n]`,
84+
defaultValue: true
9185
});
86+
if (ok) {
87+
success(`A new release for version ${version} will be prepared`);
88+
return;
89+
}
90+
throw new Error("milestone version wasn't confirmed. Please change milestone title");
9291
}
9392

9493
function calcNextVersion(version: string) {

desktop/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"include": [
5656
"src/**/*.ts",
5757
"test/**/*.ts",
58+
"scripts/**/*.ts",
5859
"package.json"
5960
],
6061
"exclude": [

0 commit comments

Comments
 (0)