@clickview/ship-it 0.0.37-dev.0 → 0.0.37-dev.2
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.
|
@@ -76,11 +76,12 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
76
76
|
utils_1.Logger.logTask('Bumping clickview npm package versions');
|
|
77
77
|
this.isReleaseBranch = RELEASE_BRANCH_REGEX.test(options.branchName);
|
|
78
78
|
this.isHotfixBranch = HOTFIX_BRANCH_REGEX.test(options.branchName);
|
|
79
|
-
utils_1.Logger.logTask('Detected that monorepo is currently in a pre-release state');
|
|
80
79
|
_a = this;
|
|
81
80
|
return [4 /*yield*/, this.getIsInPrerelease(options.branchName)];
|
|
82
81
|
case 1:
|
|
83
82
|
_a.isInPreRelease = _b.sent();
|
|
83
|
+
if (this.isInPreRelease)
|
|
84
|
+
utils_1.Logger.logTask('Detected that monorepo is currently in a pre-release state');
|
|
84
85
|
return [4 /*yield*/, this.service.getBranch(utils_1.ProjectIds.MONOREPO_PROJECT_ID, options.branchName)];
|
|
85
86
|
case 2:
|
|
86
87
|
branch = _b.sent();
|
|
@@ -176,8 +177,24 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
176
177
|
BumpPackagesTask.prototype.getNextVersion = function (version, options) {
|
|
177
178
|
// If we're in a prerelease, we only want to increment the preId part of the version number
|
|
178
179
|
if (this.isInPreRelease && options.preId) {
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
if (options.preId === 'dev') {
|
|
181
|
+
if (DEV_VERSION_REGEX.test(version)) {
|
|
182
|
+
var currentPreId = Number(version[version.length - 1]);
|
|
183
|
+
return "".concat(version.substring(0, version.length - 1)).concat(currentPreId + 1);
|
|
184
|
+
}
|
|
185
|
+
return "".concat(utils_1.Versions.getNextVersion(version, 'patch'), "-dev.0");
|
|
186
|
+
}
|
|
187
|
+
if (options.preId === 'rc') {
|
|
188
|
+
if (RC_VERSION_REGEX.test(version)) {
|
|
189
|
+
var currentPreId = Number(version[version.length - 1]);
|
|
190
|
+
return "".concat(version.substring(0, version.length - 1)).concat(currentPreId + 1);
|
|
191
|
+
}
|
|
192
|
+
if (this.isReleaseBranch)
|
|
193
|
+
return "".concat(utils_1.Versions.getNextVersion(version, 'minor'), "-rc.0");
|
|
194
|
+
if (this.isHotfixBranch)
|
|
195
|
+
return "".concat(utils_1.Versions.getNextVersion(version, 'patch'), "-rc.0");
|
|
196
|
+
}
|
|
197
|
+
return version;
|
|
181
198
|
}
|
|
182
199
|
if (options.preId === 'dev')
|
|
183
200
|
return "".concat(utils_1.Versions.getNextVersion(version, 'patch'), "-dev.0");
|
|
@@ -204,6 +221,8 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
204
221
|
case 1:
|
|
205
222
|
if (!(_i < MONOREPO_PACKAGE_JSON_FILES_1.length)) return [3 /*break*/, 4];
|
|
206
223
|
file = MONOREPO_PACKAGE_JSON_FILES_1[_i];
|
|
224
|
+
if (!file.includes('projects'))
|
|
225
|
+
return [3 /*break*/, 3];
|
|
207
226
|
return [4 /*yield*/, this.getFileText(utils_1.ProjectIds.MONOREPO_PROJECT_ID, branchName, file)];
|
|
208
227
|
case 2:
|
|
209
228
|
text = _a.sent();
|