@clickview/ship-it 0.0.4-dev.3 → 0.0.4-dev.5
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,7 +52,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.setupCommands = void 0;
|
|
54
54
|
var lodash_1 = __importDefault(require("lodash"));
|
|
55
|
-
var CommandTypeMapping_1 = require("../constants/CommandTypeMapping");
|
|
56
55
|
var AddMilestoneCommand_1 = require("./AddMilestoneCommand");
|
|
57
56
|
var GetAction_1 = require("./GetAction");
|
|
58
57
|
function setupCommands(program, container) {
|
|
@@ -77,9 +76,7 @@ function setupCommands(program, container) {
|
|
|
77
76
|
return __generator(this, function (_a) {
|
|
78
77
|
milestoneCommandOptions = (0, AddMilestoneCommand_1.processMilestoneCommandOptions)(lodash_1.default.omit(options, 'triggerMonorepoBuild'));
|
|
79
78
|
releaseCommandOptions = __assign(__assign({}, milestoneCommandOptions), { triggerMonorepoBuild: !!options.triggerMonorepoBuild });
|
|
80
|
-
|
|
81
|
-
.run(releaseCommandOptions);
|
|
82
|
-
return [2 /*return*/];
|
|
79
|
+
return [2 /*return*/, getAction('release')(releaseCommandOptions)];
|
|
83
80
|
});
|
|
84
81
|
}); });
|
|
85
82
|
program.command('bump-packages')
|
|
@@ -98,13 +95,7 @@ function setupCommands(program, container) {
|
|
|
98
95
|
.option('-m, --milestone <milestone>')
|
|
99
96
|
.option('--monorepoBranchName <monorepoBranchName>')
|
|
100
97
|
.option('-p, --projectIds <projectIds...>')
|
|
101
|
-
.action(
|
|
102
|
-
return __generator(this, function (_a) {
|
|
103
|
-
container.get(CommandTypeMapping_1.CommandTypeMapping['start-consuming-project-builds'])
|
|
104
|
-
.run(options);
|
|
105
|
-
return [2 /*return*/];
|
|
106
|
-
});
|
|
107
|
-
}); });
|
|
98
|
+
.action(getAction('start-consuming-project-builds'));
|
|
108
99
|
program.command('validate-mr')
|
|
109
100
|
.description('Validate a merge request in a single project, ensuring it has a milestone and valid description')
|
|
110
101
|
.option('-p, --projectId <projectId>')
|
|
@@ -89,11 +89,12 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
89
89
|
return [4 /*yield*/, this.getLernaCommand(options)];
|
|
90
90
|
case 2:
|
|
91
91
|
lernaVersionCmd = _a.sent();
|
|
92
|
+
console.log("Found lerna command ".concat(lernaVersionCmd, " but running dev versioning script for testing purposes"));
|
|
92
93
|
if (!lernaVersionCmd) {
|
|
93
94
|
utils_1.Logger.logError('Something went wrong while trying to detect which versioning script to run with Lerna.');
|
|
94
95
|
return [2 /*return*/, false];
|
|
95
96
|
}
|
|
96
|
-
(0, child_process_1.execSync)(
|
|
97
|
+
(0, child_process_1.execSync)("lerna version prepatch --preid dev ".concat(SHARED_LERNA_OPTIONS));
|
|
97
98
|
utils_1.Logger.logSuccess('Successfully executed Lerna versioning command.');
|
|
98
99
|
return [2 /*return*/, true];
|
|
99
100
|
}
|
|
@@ -88,9 +88,16 @@ var CommitPackageVersionsTask = /** @class */ (function () {
|
|
|
88
88
|
var commitFiles = [];
|
|
89
89
|
for (var _i = 0, MONOREPO_PACKAGE_JSON_FILES_1 = MonorepoPackageJsonFiles_1.MONOREPO_PACKAGE_JSON_FILES; _i < MONOREPO_PACKAGE_JSON_FILES_1.length; _i++) {
|
|
90
90
|
var filePath = MONOREPO_PACKAGE_JSON_FILES_1[_i];
|
|
91
|
+
var content = '';
|
|
92
|
+
try {
|
|
93
|
+
content = (0, fs_1.readFileSync)(filePath, { encoding: 'utf8' });
|
|
94
|
+
}
|
|
95
|
+
catch (_a) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
91
98
|
commitFiles.push({
|
|
92
99
|
filePath: filePath,
|
|
93
|
-
content:
|
|
100
|
+
content: content
|
|
94
101
|
});
|
|
95
102
|
}
|
|
96
103
|
return commitFiles;
|