@clickview/ship-it 0.0.35-dev.8 → 0.0.35-dev.9
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.
|
@@ -52,8 +52,6 @@ exports.BumpPackagesTask = void 0;
|
|
|
52
52
|
require("reflect-metadata");
|
|
53
53
|
var inversify_1 = require("inversify");
|
|
54
54
|
var child_process_1 = require("child_process");
|
|
55
|
-
var util = require('util');
|
|
56
|
-
var execPromise = util.promisify(child_process_1.exec);
|
|
57
55
|
var types_1 = require("../types");
|
|
58
56
|
var services_1 = require("../services");
|
|
59
57
|
var MonorepoPackageJsonFiles_1 = require("../constants/MonorepoPackageJsonFiles");
|
|
@@ -71,16 +69,16 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
71
69
|
}
|
|
72
70
|
BumpPackagesTask.prototype.run = function (options) {
|
|
73
71
|
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
var branch, isValid, lernaVersionCmd
|
|
75
|
-
return __generator(this, function (
|
|
76
|
-
switch (
|
|
72
|
+
var branch, isValid, lernaVersionCmd;
|
|
73
|
+
return __generator(this, function (_a) {
|
|
74
|
+
switch (_a.label) {
|
|
77
75
|
case 0:
|
|
78
76
|
utils_1.Logger.logTask('Bumping clickview npm package versions');
|
|
79
77
|
this.isReleaseBranch = RELEASE_BRANCH_REGEX.test(options.branchName);
|
|
80
78
|
this.isHotfixBranch = HOTFIX_BRANCH_REGEX.test(options.branchName);
|
|
81
79
|
return [4 /*yield*/, this.service.getBranch(utils_1.ProjectIds.MONOREPO_PROJECT_ID, options.branchName)];
|
|
82
80
|
case 1:
|
|
83
|
-
branch =
|
|
81
|
+
branch = _a.sent();
|
|
84
82
|
if (!branch) {
|
|
85
83
|
utils_1.Logger.logError("Branch with name ".concat(options.branchName, " was not be found."));
|
|
86
84
|
return [2 /*return*/, false];
|
|
@@ -90,26 +88,12 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
90
88
|
return [2 /*return*/, false];
|
|
91
89
|
return [4 /*yield*/, this.getLernaCommand(options)];
|
|
92
90
|
case 2:
|
|
93
|
-
lernaVersionCmd =
|
|
91
|
+
lernaVersionCmd = _a.sent();
|
|
94
92
|
if (!lernaVersionCmd) {
|
|
95
93
|
utils_1.Logger.logError('Something went wrong while trying to detect which versioning script to run with Lerna.');
|
|
96
94
|
return [2 /*return*/, false];
|
|
97
95
|
}
|
|
98
|
-
|
|
99
|
-
case 3:
|
|
100
|
-
_b.trys.push([3, 5, , 6]);
|
|
101
|
-
return [4 /*yield*/, execPromise(lernaVersionCmd, { stdio: 'inherit' })];
|
|
102
|
-
case 4:
|
|
103
|
-
_a = _b.sent(), stdout = _a.stdout, stderr = _a.stderr;
|
|
104
|
-
utils_1.Logger.logInfo('Lerna command completed');
|
|
105
|
-
utils_1.Logger.logInfo('stdout:', stdout);
|
|
106
|
-
utils_1.Logger.logInfo('stderr:', stderr);
|
|
107
|
-
return [3 /*break*/, 6];
|
|
108
|
-
case 5:
|
|
109
|
-
error_1 = _b.sent();
|
|
110
|
-
utils_1.Logger.logInfo('Error:', error_1);
|
|
111
|
-
return [3 /*break*/, 6];
|
|
112
|
-
case 6:
|
|
96
|
+
(0, child_process_1.execSync)(lernaVersionCmd, { stdio: 'inherit' });
|
|
113
97
|
utils_1.Logger.logSuccess('Successfully executed Lerna versioning command.');
|
|
114
98
|
return [2 /*return*/, true];
|
|
115
99
|
}
|