@clickview/ship-it 0.0.37-dev.1 → 0.0.37-rc.0
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.
|
@@ -154,7 +154,6 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
154
154
|
// Only bump versions for projects with an output directory
|
|
155
155
|
if (!(0, fs_1.existsSync)(MonorepoPackageJsonFiles_1.MONOREPO_DISTS_MAP[projectId]) || !(0, fs_1.statSync)(MonorepoPackageJsonFiles_1.MONOREPO_DISTS_MAP[projectId]).isDirectory())
|
|
156
156
|
continue;
|
|
157
|
-
utils_1.Logger.logInfo("Bumping version for project with ID: ".concat(projectId));
|
|
158
157
|
var content = '';
|
|
159
158
|
try {
|
|
160
159
|
content = (0, fs_1.readFileSync)(packageJsonFilePath, { encoding: 'utf8' });
|
|
@@ -178,8 +177,24 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
178
177
|
BumpPackagesTask.prototype.getNextVersion = function (version, options) {
|
|
179
178
|
// If we're in a prerelease, we only want to increment the preId part of the version number
|
|
180
179
|
if (this.isInPreRelease && options.preId) {
|
|
181
|
-
|
|
182
|
-
|
|
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;
|
|
183
198
|
}
|
|
184
199
|
if (options.preId === 'dev')
|
|
185
200
|
return "".concat(utils_1.Versions.getNextVersion(version, 'patch'), "-dev.0");
|