cross-release-cli 0.0.1-alpha.2 → 0.0.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1 -2
- package/package.json +3 -3
- package/dist/index.cjs +0 -430
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import path$1 from 'path';
|
|
3
2
|
import { spinner, log, isCancel, intro, outro, cancel, select, text, confirm } from '@clack/prompts';
|
|
4
3
|
import { findProjectFiles, getProjectVersion, isVersionValid, upgradeProjectVersion, parseVersion, getNextVersions } from 'cross-bump';
|
|
@@ -11,7 +10,7 @@ import { defu } from 'defu';
|
|
|
11
10
|
import { execa } from 'execa';
|
|
12
11
|
import debug$1 from 'debug';
|
|
13
12
|
|
|
14
|
-
var version = "0.0.1-alpha.
|
|
13
|
+
var version = "0.0.1-alpha.3";
|
|
15
14
|
|
|
16
15
|
const configDefaults = {
|
|
17
16
|
showHelp: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cross-release-cli",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.3",
|
|
4
4
|
"description": "command line app for cross language bump utility",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "rainbowatcher",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/rainbowatcher/cross-release/issues"
|
|
18
18
|
},
|
|
19
|
-
"main": "dist/index.
|
|
19
|
+
"main": "dist/index.mjs",
|
|
20
20
|
"bin": {
|
|
21
21
|
"cross-release": "./bin/cross-release.js"
|
|
22
22
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"defu": "^6.1.2",
|
|
33
33
|
"execa": "^8.0.1",
|
|
34
34
|
"is-unicode-supported": "^1.3.0",
|
|
35
|
-
"cross-bump": "0.0.1-alpha.
|
|
35
|
+
"cross-bump": "0.0.1-alpha.3"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"clean": "rimraf dist/*",
|
package/dist/index.cjs
DELETED
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var path$1 = require('path');
|
|
4
|
-
var prompts = require('@clack/prompts');
|
|
5
|
-
var crossBump = require('cross-bump');
|
|
6
|
-
var colorette = require('colorette');
|
|
7
|
-
var isUnicodeSupported = require('is-unicode-supported');
|
|
8
|
-
var path = require('node:path');
|
|
9
|
-
var fs = require('node:fs');
|
|
10
|
-
var cac = require('cac');
|
|
11
|
-
var defu = require('defu');
|
|
12
|
-
var execa = require('execa');
|
|
13
|
-
var debug$1 = require('debug');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
|
-
|
|
17
|
-
function _interopNamespace(e) {
|
|
18
|
-
if (e && e.__esModule) return e;
|
|
19
|
-
var n = Object.create(null);
|
|
20
|
-
if (e) {
|
|
21
|
-
Object.keys(e).forEach(function (k) {
|
|
22
|
-
if (k !== 'default') {
|
|
23
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
24
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () { return e[k]; }
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
n["default"] = e;
|
|
32
|
-
return Object.freeze(n);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path$1);
|
|
36
|
-
var isUnicodeSupported__default = /*#__PURE__*/_interopDefaultLegacy(isUnicodeSupported);
|
|
37
|
-
var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
38
|
-
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
39
|
-
var cac__default = /*#__PURE__*/_interopDefaultLegacy(cac);
|
|
40
|
-
var debug__default = /*#__PURE__*/_interopDefaultLegacy(debug$1);
|
|
41
|
-
|
|
42
|
-
var version = "0.0.1-alpha.1";
|
|
43
|
-
|
|
44
|
-
const configDefaults = {
|
|
45
|
-
showHelp: false,
|
|
46
|
-
showVersion: false,
|
|
47
|
-
version: "",
|
|
48
|
-
isAllYes: false,
|
|
49
|
-
isDry: false,
|
|
50
|
-
isRecursive: false,
|
|
51
|
-
shouldCommit: false,
|
|
52
|
-
shouldPublish: false,
|
|
53
|
-
shouldPush: false,
|
|
54
|
-
shouldTag: false,
|
|
55
|
-
excludes: ["node_modules", ".git"],
|
|
56
|
-
dir: process.cwd(),
|
|
57
|
-
commit: {
|
|
58
|
-
shouldVerify: true,
|
|
59
|
-
shouldStageAll: true,
|
|
60
|
-
template: "chore: release v%s"
|
|
61
|
-
},
|
|
62
|
-
push: {
|
|
63
|
-
shouldFollowTags: false
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
function loadUserConfig(overrides) {
|
|
67
|
-
const file = fs__namespace.readFileSync(path__namespace.resolve(process.cwd(), "package.json"), "utf-8");
|
|
68
|
-
const userConfig = JSON.parse(file)["cross-release"];
|
|
69
|
-
return defu.defu(overrides, userConfig, configDefaults);
|
|
70
|
-
}
|
|
71
|
-
function parseOptions() {
|
|
72
|
-
const cli = cac__default["default"]("cross-release").version(version).usage("[flags] version").option("-r, --recursive", "Run the command for each project in the workspace (default: false)").option("-d, --dry", "Dry run (default: false)").option("-D, --dir [dir]", "Set working directory (default: project root)").option("-p, --publish", "Publish the project (default: false)").option("-c, --commit", "Commit current changes (default: false)").option("-p, --push", "Push the project to remote (default: false)").option("-t, --tag", "Create a tag for current version (default: false)").option("-e, --exclude [dir]", "Folders to exclude from search (default: [node_modules, .git])").option("-y, --yes", "Answer yes to all prompts (default: false)").help().parse();
|
|
73
|
-
const { args, options } = cli;
|
|
74
|
-
const parsedArgs = loadUserConfig({
|
|
75
|
-
dir: options.dir,
|
|
76
|
-
excludes: options.exclude,
|
|
77
|
-
isRecursive: options.recursive,
|
|
78
|
-
isDry: options.dry,
|
|
79
|
-
isAllYes: options.yes,
|
|
80
|
-
showHelp: options.help,
|
|
81
|
-
showVersion: options.version,
|
|
82
|
-
shouldCommit: options.commit,
|
|
83
|
-
shouldPublish: options.publish,
|
|
84
|
-
shouldPush: options.push,
|
|
85
|
-
shouldTag: options.tag,
|
|
86
|
-
version: args[0]
|
|
87
|
-
});
|
|
88
|
-
return parsedArgs;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function createDebug(ns) {
|
|
92
|
-
return debug__default["default"](`cross-release-cli:${ns}`);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const debug = createDebug("git");
|
|
96
|
-
async function gitTag(tagName, options) {
|
|
97
|
-
const s = prompts.spinner();
|
|
98
|
-
s.start("creating tag");
|
|
99
|
-
const { isForce = false, isDel = false, message } = options || {};
|
|
100
|
-
const args = [];
|
|
101
|
-
if (isDel) {
|
|
102
|
-
args.push("--delete");
|
|
103
|
-
} else {
|
|
104
|
-
if (!message || message?.length === 0) {
|
|
105
|
-
prompts.log.warn("no message provided, is recommended to provide a message for create an annotated tag");
|
|
106
|
-
} else {
|
|
107
|
-
args.push(
|
|
108
|
-
// Create an annotated tag, which is recommended for releases.
|
|
109
|
-
// See https://git-scm.com/docs/git-tag
|
|
110
|
-
"--annotate",
|
|
111
|
-
// Use the same commit message for the tag
|
|
112
|
-
"--message",
|
|
113
|
-
// formatMessageString(template, nextVersion),
|
|
114
|
-
message
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
if (isForce)
|
|
119
|
-
args.push("--force");
|
|
120
|
-
args.push(tagName);
|
|
121
|
-
if (!process.env.DRY) {
|
|
122
|
-
try {
|
|
123
|
-
const { command } = await execa.execa("git", ["tag", ...args]);
|
|
124
|
-
debug(`command: ${command}`);
|
|
125
|
-
} catch (e) {
|
|
126
|
-
s.stop(colorette.red(e.shortMessage));
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
s.stop(`create git tag: ${colorette.blue(tagName)}`);
|
|
131
|
-
return true;
|
|
132
|
-
}
|
|
133
|
-
async function gitCommit(message, options) {
|
|
134
|
-
const s = prompts.spinner();
|
|
135
|
-
s.start("committing");
|
|
136
|
-
const { modifiedFiles = [], shouldStageAll, shouldVerify } = options || {};
|
|
137
|
-
const args = [];
|
|
138
|
-
if (process.env.DRY) {
|
|
139
|
-
args.push("--dry-run");
|
|
140
|
-
}
|
|
141
|
-
args.push("--message", message);
|
|
142
|
-
if (!shouldStageAll && modifiedFiles.length) {
|
|
143
|
-
args.push("--", ...modifiedFiles);
|
|
144
|
-
} else {
|
|
145
|
-
args.push("--all");
|
|
146
|
-
}
|
|
147
|
-
if (!shouldVerify) {
|
|
148
|
-
args.push("--no-verify");
|
|
149
|
-
}
|
|
150
|
-
try {
|
|
151
|
-
const { command } = await execa.execa("git", ["commit", ...args]);
|
|
152
|
-
debug(`command: ${command}`);
|
|
153
|
-
s.stop(`commit message: ${colorette.green(message)}`);
|
|
154
|
-
} catch (e) {
|
|
155
|
-
s.stop(colorette.red(e.shortMessage));
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
return true;
|
|
159
|
-
}
|
|
160
|
-
async function gitPush(options) {
|
|
161
|
-
const { shouldFollowTags = true, remote, branch } = options || {};
|
|
162
|
-
const s = prompts.spinner();
|
|
163
|
-
s.start("pushing");
|
|
164
|
-
const originUrl = await gitOriginUrl();
|
|
165
|
-
const args = [];
|
|
166
|
-
if (shouldFollowTags) {
|
|
167
|
-
args.push("--follow-tags");
|
|
168
|
-
}
|
|
169
|
-
if (remote) {
|
|
170
|
-
args.push(remote);
|
|
171
|
-
if (branch) {
|
|
172
|
-
args.push(branch);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
if (process.env.DRY) {
|
|
176
|
-
args.push("--dry-run");
|
|
177
|
-
}
|
|
178
|
-
try {
|
|
179
|
-
const { command } = await execa.execa("git", ["push", ...args]);
|
|
180
|
-
debug(`command: ${command}`);
|
|
181
|
-
s.stop(`pushed to repo: ${colorette.gray(originUrl)}`);
|
|
182
|
-
} catch (e) {
|
|
183
|
-
s.stop(colorette.red(e.shortMessage));
|
|
184
|
-
return false;
|
|
185
|
-
}
|
|
186
|
-
return true;
|
|
187
|
-
}
|
|
188
|
-
async function gitOriginUrl() {
|
|
189
|
-
return (await execa.execa("git", ["remote", "get-url", "origin"])).stdout.trim();
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
var ExitCode = /* @__PURE__ */ ((ExitCode2) => {
|
|
193
|
-
ExitCode2[ExitCode2["Success"] = 0] = "Success";
|
|
194
|
-
ExitCode2[ExitCode2["FatalError"] = 1] = "FatalError";
|
|
195
|
-
ExitCode2[ExitCode2["InvalidArgument"] = 9] = "InvalidArgument";
|
|
196
|
-
return ExitCode2;
|
|
197
|
-
})(ExitCode || {});
|
|
198
|
-
|
|
199
|
-
var __accessCheck = (obj, member, msg) => {
|
|
200
|
-
if (!member.has(obj))
|
|
201
|
-
throw TypeError("Cannot " + msg);
|
|
202
|
-
};
|
|
203
|
-
var __privateAdd = (obj, member, value) => {
|
|
204
|
-
if (member.has(obj))
|
|
205
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
206
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
207
|
-
};
|
|
208
|
-
var __privateMethod = (obj, member, method) => {
|
|
209
|
-
__accessCheck(obj, member, "access private method");
|
|
210
|
-
return method;
|
|
211
|
-
};
|
|
212
|
-
var _checkDryRun, checkDryRun_fn, _getNextVersion, getNextVersion_fn, _getProjects, getProjects_fn, _confirmReleaseOptions, confirmReleaseOptions_fn, _addTask, addTask_fn, _start, start_fn, _done, done_fn, _check, check_fn;
|
|
213
|
-
function message(msg) {
|
|
214
|
-
const bar = isUnicodeSupported__default["default"]() ? "\u2502" : "|";
|
|
215
|
-
console.log(`${colorette.gray(bar)} ${msg}`);
|
|
216
|
-
}
|
|
217
|
-
function handleUserCancel() {
|
|
218
|
-
prompts.cancel("User cancel");
|
|
219
|
-
process.exit(ExitCode.InvalidArgument);
|
|
220
|
-
}
|
|
221
|
-
async function chooseVersion(currentVersion) {
|
|
222
|
-
const versionObj = crossBump.parseVersion(currentVersion);
|
|
223
|
-
const {
|
|
224
|
-
nextMajor,
|
|
225
|
-
nextMinor,
|
|
226
|
-
nextPatch,
|
|
227
|
-
nextRelease,
|
|
228
|
-
nextPreMajor,
|
|
229
|
-
nextPreMinor,
|
|
230
|
-
nextPrePatch
|
|
231
|
-
} = crossBump.getNextVersions(versionObj ?? void 0);
|
|
232
|
-
const C_CUSTOM = "custom";
|
|
233
|
-
const versions = [
|
|
234
|
-
{ label: "custom...", value: C_CUSTOM },
|
|
235
|
-
{ label: `next (${nextRelease})`, value: nextRelease },
|
|
236
|
-
{ label: `keep (${currentVersion})`, value: currentVersion || "" },
|
|
237
|
-
{ label: `patch (${nextPatch})`, value: nextPatch },
|
|
238
|
-
{ label: `minor (${nextMinor})`, value: nextMinor },
|
|
239
|
-
{ label: `major (${nextMajor})`, value: nextMajor },
|
|
240
|
-
{ label: `pre-patch (${nextPrePatch})`, value: nextPrePatch },
|
|
241
|
-
{ label: `pre-minor (${nextPreMinor})`, value: nextPreMinor },
|
|
242
|
-
{ label: `pre-major (${nextPreMajor})`, value: nextPreMajor }
|
|
243
|
-
];
|
|
244
|
-
const selectedValue = await prompts.select({
|
|
245
|
-
message: `Pick a project version. (current: ${currentVersion})`,
|
|
246
|
-
options: versions,
|
|
247
|
-
initialValue: versions[1].value ?? C_CUSTOM
|
|
248
|
-
});
|
|
249
|
-
if (!selectedValue || selectedValue === C_CUSTOM) {
|
|
250
|
-
return await prompts.text({
|
|
251
|
-
message: "Input your custom version number",
|
|
252
|
-
placeholder: "version number",
|
|
253
|
-
validate: (value) => {
|
|
254
|
-
if (!crossBump.isVersionValid(value)) {
|
|
255
|
-
return "Invalid";
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
} else {
|
|
260
|
-
return selectedValue;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
class App {
|
|
264
|
-
constructor() {
|
|
265
|
-
__privateAdd(this, _checkDryRun);
|
|
266
|
-
__privateAdd(this, _getNextVersion);
|
|
267
|
-
__privateAdd(this, _getProjects);
|
|
268
|
-
__privateAdd(this, _confirmReleaseOptions);
|
|
269
|
-
__privateAdd(this, _addTask);
|
|
270
|
-
__privateAdd(this, _start);
|
|
271
|
-
__privateAdd(this, _done);
|
|
272
|
-
__privateAdd(this, _check);
|
|
273
|
-
this.currentVersion = "";
|
|
274
|
-
this.nextVersion = "";
|
|
275
|
-
this.modifiedFiles = [];
|
|
276
|
-
this.taskQueue = [];
|
|
277
|
-
this.taskStatus = "pending";
|
|
278
|
-
this.options = parseOptions();
|
|
279
|
-
}
|
|
280
|
-
async run() {
|
|
281
|
-
__privateMethod(this, _start, start_fn).call(this);
|
|
282
|
-
await __privateMethod(this, _getNextVersion, getNextVersion_fn).call(this);
|
|
283
|
-
await __privateMethod(this, _getProjects, getProjects_fn).call(this);
|
|
284
|
-
await __privateMethod(this, _confirmReleaseOptions, confirmReleaseOptions_fn).call(this);
|
|
285
|
-
for await (const task of this.taskQueue) {
|
|
286
|
-
if (this.taskStatus === "failed") {
|
|
287
|
-
break;
|
|
288
|
-
} else {
|
|
289
|
-
await task.exec();
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
__privateMethod(this, _done, done_fn).call(this);
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Accepts a message string template (e.g. "release %s" or "This is the %s release").
|
|
296
|
-
* If the template contains any "%s" placeholders, then they are replaced with the version number;
|
|
297
|
-
* otherwise, the version number is appended to the string.
|
|
298
|
-
*/
|
|
299
|
-
formatMessageString(template, nextVersion) {
|
|
300
|
-
if (template.includes("%s")) {
|
|
301
|
-
return template.replace(/%s/g, nextVersion);
|
|
302
|
-
} else {
|
|
303
|
-
return template + nextVersion;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
_checkDryRun = new WeakSet();
|
|
308
|
-
checkDryRun_fn = function() {
|
|
309
|
-
if (this.options.isDry) {
|
|
310
|
-
prompts.log.message(colorette.bgBlue(" DRY RUN "));
|
|
311
|
-
process.env.DRY = "true";
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
_getNextVersion = new WeakSet();
|
|
315
|
-
getNextVersion_fn = async function() {
|
|
316
|
-
const { dir, excludes, version } = this.options;
|
|
317
|
-
const projectFile = await crossBump.findProjectFiles(dir, excludes);
|
|
318
|
-
if (!projectFile.length) {
|
|
319
|
-
throw new Error("can't found any project file in the project root");
|
|
320
|
-
}
|
|
321
|
-
const projectVersion = await crossBump.getProjectVersion(projectFile[0]);
|
|
322
|
-
this.currentVersion = projectVersion || "";
|
|
323
|
-
if (crossBump.isVersionValid(version)) {
|
|
324
|
-
this.nextVersion = version;
|
|
325
|
-
} else {
|
|
326
|
-
const nextVersion = await chooseVersion(this.currentVersion);
|
|
327
|
-
if (prompts.isCancel(nextVersion)) {
|
|
328
|
-
handleUserCancel();
|
|
329
|
-
} else {
|
|
330
|
-
this.nextVersion = nextVersion;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
_getProjects = new WeakSet();
|
|
335
|
-
getProjects_fn = async function() {
|
|
336
|
-
const { options: { dir, excludes, isRecursive }, nextVersion } = this;
|
|
337
|
-
const projectFiles = await crossBump.findProjectFiles(dir, excludes, isRecursive);
|
|
338
|
-
__privateMethod(this, _addTask, addTask_fn).call(this, {
|
|
339
|
-
name: "upgradeVersion",
|
|
340
|
-
exec: () => {
|
|
341
|
-
return Promise.all(projectFiles.map(async (projectFile) => {
|
|
342
|
-
try {
|
|
343
|
-
await crossBump.upgradeProjectVersion(nextVersion, projectFile);
|
|
344
|
-
this.modifiedFiles.push(projectFile.path);
|
|
345
|
-
message(`upgrade to ${colorette.blue(nextVersion)} for ${colorette.gray(path__default["default"].relative(dir, projectFile.path))}`);
|
|
346
|
-
} catch (e) {
|
|
347
|
-
this.taskStatus = "failed";
|
|
348
|
-
prompts.log.error(String(e));
|
|
349
|
-
}
|
|
350
|
-
}));
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
};
|
|
354
|
-
_confirmReleaseOptions = new WeakSet();
|
|
355
|
-
confirmReleaseOptions_fn = async function() {
|
|
356
|
-
const { isAllYes, commit } = this.options;
|
|
357
|
-
const confirmAndSet = async (optionName, message3, taskName, execFn) => {
|
|
358
|
-
if (isAllYes) {
|
|
359
|
-
this.options[optionName] = true;
|
|
360
|
-
} else if (!this.options[optionName]) {
|
|
361
|
-
const confirmation = await prompts.confirm({ message: message3 });
|
|
362
|
-
if (!prompts.isCancel(confirmation)) {
|
|
363
|
-
this.options[optionName] = confirmation;
|
|
364
|
-
} else {
|
|
365
|
-
handleUserCancel();
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
if (this.options[optionName]) {
|
|
369
|
-
__privateMethod(this, _addTask, addTask_fn).call(this, {
|
|
370
|
-
name: taskName,
|
|
371
|
-
exec: execFn
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
};
|
|
375
|
-
const message2 = this.formatMessageString(commit.template, this.nextVersion);
|
|
376
|
-
await confirmAndSet(
|
|
377
|
-
"shouldCommit",
|
|
378
|
-
"should commit?",
|
|
379
|
-
"commit",
|
|
380
|
-
async () => {
|
|
381
|
-
__privateMethod(this, _check, check_fn).call(this, await gitCommit(message2, {
|
|
382
|
-
modifiedFiles: this.modifiedFiles,
|
|
383
|
-
shouldStageAll: commit.shouldStageAll,
|
|
384
|
-
shouldVerify: commit.shouldVerify
|
|
385
|
-
}));
|
|
386
|
-
}
|
|
387
|
-
);
|
|
388
|
-
const tagName = `v${this.nextVersion}`;
|
|
389
|
-
await confirmAndSet(
|
|
390
|
-
"shouldTag",
|
|
391
|
-
"should create tag?",
|
|
392
|
-
"tag",
|
|
393
|
-
async () => {
|
|
394
|
-
__privateMethod(this, _check, check_fn).call(this, await gitTag(tagName, { message: message2 }));
|
|
395
|
-
}
|
|
396
|
-
);
|
|
397
|
-
await confirmAndSet(
|
|
398
|
-
"shouldPush",
|
|
399
|
-
"should push to remote?",
|
|
400
|
-
"push",
|
|
401
|
-
async () => {
|
|
402
|
-
__privateMethod(this, _check, check_fn).call(this, await gitPush({ shouldFollowTags: this.options.push.shouldFollowTags }));
|
|
403
|
-
}
|
|
404
|
-
);
|
|
405
|
-
};
|
|
406
|
-
_addTask = new WeakSet();
|
|
407
|
-
addTask_fn = function(task) {
|
|
408
|
-
const expect = this.taskQueue.length + 1;
|
|
409
|
-
return this.taskQueue.push(task) === expect;
|
|
410
|
-
};
|
|
411
|
-
_start = new WeakSet();
|
|
412
|
-
start_fn = function() {
|
|
413
|
-
prompts.intro("Cross release");
|
|
414
|
-
__privateMethod(this, _checkDryRun, checkDryRun_fn).call(this);
|
|
415
|
-
this.taskStatus = "running";
|
|
416
|
-
};
|
|
417
|
-
_done = new WeakSet();
|
|
418
|
-
done_fn = function() {
|
|
419
|
-
prompts.outro("Done");
|
|
420
|
-
this.taskStatus = "finished";
|
|
421
|
-
};
|
|
422
|
-
_check = new WeakSet();
|
|
423
|
-
check_fn = function(status) {
|
|
424
|
-
if (!status) {
|
|
425
|
-
this.taskStatus = "failed";
|
|
426
|
-
}
|
|
427
|
-
};
|
|
428
|
-
var app = new App();
|
|
429
|
-
|
|
430
|
-
void app.run();
|