@clickview/ship-it 0.0.35-dev.15 → 0.0.35-dev.16
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.
|
@@ -359,22 +359,6 @@ var GitLabApiClient = /** @class */ (function () {
|
|
|
359
359
|
});
|
|
360
360
|
});
|
|
361
361
|
};
|
|
362
|
-
GitLabApiClient.prototype.updateFiles = function (projectId, branchName, commitMessage, files) {
|
|
363
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
364
|
-
return __generator(this, function (_a) {
|
|
365
|
-
switch (_a.label) {
|
|
366
|
-
case 0: return [4 /*yield*/, this.client.Commits.create(projectId, branchName, commitMessage, files.map(function (f) { return ({
|
|
367
|
-
action: 'update',
|
|
368
|
-
filePath: f.filePath,
|
|
369
|
-
content: f.content
|
|
370
|
-
}); }))];
|
|
371
|
-
case 1:
|
|
372
|
-
_a.sent();
|
|
373
|
-
return [2 /*return*/];
|
|
374
|
-
}
|
|
375
|
-
});
|
|
376
|
-
});
|
|
377
|
-
};
|
|
378
362
|
GitLabApiClient.prototype.commit = function (projectId, branchName, files, commitMessage) {
|
|
379
363
|
return __awaiter(this, void 0, void 0, function () {
|
|
380
364
|
return __generator(this, function (_a) {
|
package/lib/src/index.js
CHANGED
|
File without changes
|
|
@@ -353,9 +353,6 @@ var GitLabService = /** @class */ (function () {
|
|
|
353
353
|
GitLabService.prototype.updateFile = function (projectId, filePath, branchName, content, commit) {
|
|
354
354
|
return this.apiClient.updateFile(projectId, filePath, branchName, content, commit);
|
|
355
355
|
};
|
|
356
|
-
GitLabService.prototype.updateFiles = function (projectId, branchName, commitMessage, files) {
|
|
357
|
-
return this.apiClient.updateFiles(projectId, branchName, commitMessage, files);
|
|
358
|
-
};
|
|
359
356
|
GitLabService.prototype.commit = function (projectId, branchName, commitMessage, files) {
|
|
360
357
|
return __awaiter(this, void 0, void 0, function () {
|
|
361
358
|
return __generator(this, function (_a) {
|
|
@@ -69,12 +69,12 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
69
69
|
}
|
|
70
70
|
BumpPackagesTask.prototype.run = function (options) {
|
|
71
71
|
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
-
var _a, branch, isValid, commitFiles;
|
|
72
|
+
var _a, branch, isValid, commitFiles, _i, commitFiles_1, file;
|
|
73
73
|
return __generator(this, function (_b) {
|
|
74
74
|
switch (_b.label) {
|
|
75
75
|
case 0:
|
|
76
76
|
utils_1.Logger.logTask('Bumping clickview npm package versions');
|
|
77
|
-
this.isReleaseBranch = RELEASE_BRANCH_REGEX.test(options.branchName)
|
|
77
|
+
this.isReleaseBranch = RELEASE_BRANCH_REGEX.test(options.branchName);
|
|
78
78
|
this.isHotfixBranch = HOTFIX_BRANCH_REGEX.test(options.branchName);
|
|
79
79
|
utils_1.Logger.logTask('Detected that monorepo is currently in a pre-release state');
|
|
80
80
|
_a = this;
|
|
@@ -93,10 +93,19 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
93
93
|
return [2 /*return*/, false];
|
|
94
94
|
utils_1.Logger.logInfo('Options are valid! Proceeding to bump package versions.');
|
|
95
95
|
commitFiles = this.getCommitFiles(options);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
utils_1.Logger.logInfo('Writing new versions to package.json files...');
|
|
97
|
+
for (_i = 0, commitFiles_1 = commitFiles; _i < commitFiles_1.length; _i++) {
|
|
98
|
+
file = commitFiles_1[_i];
|
|
99
|
+
(0, fs_1.writeFileSync)(file.filePath, file.content);
|
|
100
|
+
}
|
|
101
|
+
// Logger.logInfo('Committing new versions...');
|
|
102
|
+
// await this.service.commit(
|
|
103
|
+
// ProjectIds.MONOREPO_PROJECT_ID,
|
|
104
|
+
// options.branchName,
|
|
105
|
+
// 'Bump package versions',
|
|
106
|
+
// commitFiles
|
|
107
|
+
// );
|
|
108
|
+
utils_1.Logger.logSuccess('Successfully updated version numbers.');
|
|
100
109
|
return [2 /*return*/, true];
|
|
101
110
|
}
|
|
102
111
|
});
|
|
@@ -145,7 +154,6 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
145
154
|
var content = '';
|
|
146
155
|
try {
|
|
147
156
|
content = (0, fs_1.readFileSync)(filePath, { encoding: 'utf8' });
|
|
148
|
-
utils_1.Logger.logInfo('file', filePath, content);
|
|
149
157
|
}
|
|
150
158
|
catch (_a) {
|
|
151
159
|
/**
|