@codiac.io/codiac-cli 1.2.172 → 1.2.173
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.
- package/README.md +1 -1
- package/lib/command-base-tenantless.js +7 -0
- package/lib/command-base-tenantless.js.map +1 -1
- package/lib/commands/build.d.ts +1 -0
- package/lib/commands/build.js +3 -2
- package/lib/commands/build.js.map +1 -1
- package/lib/commands/images/add.js +1 -1
- package/lib/commands/images/add.js.map +1 -1
- package/lib/commands/images/version/bump.d.ts +18 -0
- package/lib/commands/images/version/bump.js +61 -0
- package/lib/commands/images/version/bump.js.map +1 -0
- package/lib/commands/images/version.js +1 -1
- package/lib/commands/images/version.js.map +1 -1
- package/lib/ops/LocalOps.d.ts +4 -31
- package/lib/ops/LocalOps.js +94 -156
- package/lib/ops/LocalOps.js.map +1 -1
- package/lib/ops/test/when-versions-are-parsed.spec.js +8 -6
- package/lib/ops/test/when-versions-are-parsed.spec.js.map +1 -1
- package/lib/ops/workspace-versioner.d.ts +122 -0
- package/lib/ops/workspace-versioner.js +292 -0
- package/lib/ops/workspace-versioner.js.map +1 -0
- package/oclif.manifest.json +80 -4
- package/package.json +1 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SemanticVersioner = exports.WorkspaceVersioner = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const codiac_common_1 = require("@codiac.io/codiac-common");
|
|
6
|
+
const contracts_1 = require("@codiac.io/codiac-common/contracts");
|
|
7
|
+
const inversify_1 = require("inversify");
|
|
8
|
+
const cli_context_repo_1 = require("./data/cli-context-repo");
|
|
9
|
+
const dx_constants_1 = require("./dx-constants");
|
|
10
|
+
const semver = require("semver");
|
|
11
|
+
/** Manages the semantic version number for image exports declared in the workspace (aka: the codiac.json). */
|
|
12
|
+
let WorkspaceVersioner = class WorkspaceVersioner {
|
|
13
|
+
constructor(logger, projCfgRepo
|
|
14
|
+
// @inject(SemanticVersioner) private versioner: SemanticVersioner
|
|
15
|
+
) {
|
|
16
|
+
this.logger = logger;
|
|
17
|
+
this.projCfgRepo = projCfgRepo;
|
|
18
|
+
this.versioner = new SemanticVersioner(logger);
|
|
19
|
+
}
|
|
20
|
+
/** Increments the version number of the given image export by the given increment.
|
|
21
|
+
* Retains existing version number if no increment is specified.
|
|
22
|
+
* Sets to the default init version number if the imageExport doesnt yet have a version declared.
|
|
23
|
+
* Writes changes to the project config (aka: codiac.json).
|
|
24
|
+
* Throws if existing version is invalid.
|
|
25
|
+
*
|
|
26
|
+
* @param cfg Project config doc (aka: codiac.json deserialized)
|
|
27
|
+
*/
|
|
28
|
+
incrementImageVersion(imageExport, cfg, increment) {
|
|
29
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
try {
|
|
32
|
+
if (!imageExport.version)
|
|
33
|
+
imageExport.version = dx_constants_1.DxConstants.DEFAULT_INIT_IMAGE_VERSION; // TODO: Absorb this into this class
|
|
34
|
+
let newVersion = this.versioner.incrementVersion(imageExport.version, increment);
|
|
35
|
+
if (newVersion != imageExport.version) {
|
|
36
|
+
imageExport.version = newVersion;
|
|
37
|
+
if (!cfg.images)
|
|
38
|
+
cfg.images = {};
|
|
39
|
+
cfg.images[imageExport.name] = imageExport;
|
|
40
|
+
yield this.projCfgRepo.updateProjectConfigFile(cfg);
|
|
41
|
+
}
|
|
42
|
+
resolve(imageExport);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
reject(err);
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/** Increments the project code version number by the given increment.
|
|
51
|
+
* Retains existing version number if no increment is specified.
|
|
52
|
+
* Writes changes to the project config (aka: codiac.json).
|
|
53
|
+
* Throws if existing version is invalid.
|
|
54
|
+
*
|
|
55
|
+
* @param cfg Project config doc (aka: codiac.json deserialized)
|
|
56
|
+
*/
|
|
57
|
+
incrementCodeVersion(cfg, increment) {
|
|
58
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
try {
|
|
61
|
+
let newVersion = this.versioner.incrementVersion(cfg.codeVersion, increment);
|
|
62
|
+
if (newVersion != cfg.codeVersion) {
|
|
63
|
+
cfg.codeVersion = newVersion;
|
|
64
|
+
yield this.projCfgRepo.updateProjectConfigFile(cfg);
|
|
65
|
+
}
|
|
66
|
+
resolve(cfg);
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
reject(err);
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
WorkspaceVersioner = tslib_1.__decorate([
|
|
76
|
+
(0, inversify_1.injectable)(),
|
|
77
|
+
tslib_1.__param(0, (0, inversify_1.inject)(codiac_common_1.INTERFACES.IBetterLogger)),
|
|
78
|
+
tslib_1.__param(1, (0, inversify_1.inject)(cli_context_repo_1.ProjectContextRepo)),
|
|
79
|
+
tslib_1.__metadata("design:paramtypes", [Object, cli_context_repo_1.ProjectContextRepo
|
|
80
|
+
// @inject(SemanticVersioner) private versioner: SemanticVersioner
|
|
81
|
+
])
|
|
82
|
+
], WorkspaceVersioner);
|
|
83
|
+
exports.WorkspaceVersioner = WorkspaceVersioner;
|
|
84
|
+
let SemanticVersioner = class SemanticVersioner {
|
|
85
|
+
constructor(logger) {
|
|
86
|
+
this.logger = logger;
|
|
87
|
+
}
|
|
88
|
+
/** Increments the given semantic version nnumber by the given increment.
|
|
89
|
+
* Returns existing version number if no increment is specified.
|
|
90
|
+
* Throws if existing version is invalid.
|
|
91
|
+
*/
|
|
92
|
+
incrementVersion(existing, increment) {
|
|
93
|
+
try {
|
|
94
|
+
let newVersion = existing;
|
|
95
|
+
if (increment) {
|
|
96
|
+
if (increment.fullName) {
|
|
97
|
+
this.logger.notice(`Applying new version number ${increment.fullName}...`);
|
|
98
|
+
newVersion = increment.fullName;
|
|
99
|
+
}
|
|
100
|
+
else if (increment.major) {
|
|
101
|
+
this.logger.notice(`Incrementing ${"major"} version number...`);
|
|
102
|
+
newVersion = semver.inc(existing, "major");
|
|
103
|
+
}
|
|
104
|
+
else if (increment.minor) {
|
|
105
|
+
this.logger.notice(`Incrementing ${"minor"} version number...`);
|
|
106
|
+
newVersion = semver.inc(existing, "minor");
|
|
107
|
+
}
|
|
108
|
+
else if (increment.patch) {
|
|
109
|
+
this.logger.notice(`Incrementing ${"patch"} version number...`);
|
|
110
|
+
newVersion = semver.inc(existing, "patch");
|
|
111
|
+
}
|
|
112
|
+
else if (increment.preId) {
|
|
113
|
+
this.logger.notice(`Incrementing ${"prerelease"} id and number...`);
|
|
114
|
+
newVersion = this.addPrereleaseId(existing, increment.preId);
|
|
115
|
+
newVersion = semver.inc(newVersion, "prerelease");
|
|
116
|
+
}
|
|
117
|
+
else if (increment.prerelease) {
|
|
118
|
+
this.logger.notice(`Incrementing ${"prerelease"} version number...`);
|
|
119
|
+
newVersion = semver.inc(existing, "prerelease");
|
|
120
|
+
}
|
|
121
|
+
if (newVersion == null)
|
|
122
|
+
throw new contracts_1.CodiacError(`Cannot increment; current version number [${existing}] is not a valid semantic version.`);
|
|
123
|
+
}
|
|
124
|
+
return newVersion;
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
throw err;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/** Prefixes the prerelease version segment
|
|
131
|
+
* with the given prerelease identifier.
|
|
132
|
+
*
|
|
133
|
+
* using format: `[major].[minor].[patch]-[id].[prereleaseNumber]`
|
|
134
|
+
*
|
|
135
|
+
* eg: `1.2.3` remains `1.2.3`
|
|
136
|
+
* eg: `1.2.3-4` becomes `1.2.3-thisBranch.4`
|
|
137
|
+
* eg: `1.2.3-toro.4` becomes `1.2.3-thisBranch.4` */
|
|
138
|
+
addPrereleaseId(version, prereleaseId) {
|
|
139
|
+
let output = version;
|
|
140
|
+
let parts = semver.parse(version);
|
|
141
|
+
// let ultimateId = /[^\w\d\.-]/g.exec(id);
|
|
142
|
+
let ultimateId = prereleaseId.replace(/[^\w\d\.-]|_/g, "-");
|
|
143
|
+
// console.log(ultimateId);
|
|
144
|
+
if (parts) {
|
|
145
|
+
let pre = parts.prerelease; // semver.prerelease(version);
|
|
146
|
+
let newPre;
|
|
147
|
+
if (pre === null || pre.length == 0) {
|
|
148
|
+
// CASE 0) no prerelease at all.
|
|
149
|
+
newPre = [ultimateId];
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
let newBuild = [...parts.build];
|
|
153
|
+
if (pre.length == 1) {
|
|
154
|
+
if (typeof pre[0] === 'number') {
|
|
155
|
+
// CASE 1) prerelease is a number
|
|
156
|
+
output = `${ultimateId}.${pre[0]}`;
|
|
157
|
+
newPre = [ultimateId, 0];
|
|
158
|
+
newBuild = [];
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
// CASE 2) just a string body - no numeric suffix
|
|
162
|
+
newPre = [ultimateId, 0];
|
|
163
|
+
newBuild = [];
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else if (pre.length == 2) {
|
|
167
|
+
// CASE 3) string body with numeric suffix
|
|
168
|
+
if (pre[0] === ultimateId) {
|
|
169
|
+
// CASE 3A) id already in prerelease
|
|
170
|
+
newPre = [...pre]; // id is already in the prerelease; keep it as is.
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
// CASE 3B) given version has a diff prerelease id
|
|
174
|
+
newPre = [ultimateId, 0];
|
|
175
|
+
newBuild = [];
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
// more than two segments in prerelease?
|
|
180
|
+
// Is this the case when a build number is attached? eg: [id].[number]+[build]
|
|
181
|
+
newPre = [...pre]; // not supporting this case yet...
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
output = `${parts.major}.${parts.minor}.${parts.patch}`;
|
|
185
|
+
if (newPre.length > 0) {
|
|
186
|
+
output = output.concat("-", newPre.join("."));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return output;
|
|
190
|
+
}
|
|
191
|
+
/** Rewrites the entire semantic version with the given semantic version.
|
|
192
|
+
*
|
|
193
|
+
* @param version (required) Must be a valid semantic version (eg: `1.2.3` or `1.2.3-something` or `1.2.3-something.4`).
|
|
194
|
+
*/
|
|
195
|
+
bump(change) {
|
|
196
|
+
try {
|
|
197
|
+
let newVersion = "";
|
|
198
|
+
return newVersion;
|
|
199
|
+
}
|
|
200
|
+
catch (err) {
|
|
201
|
+
throw err;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/** Rewrites the entire semantic version with the given semantic version.
|
|
205
|
+
*
|
|
206
|
+
* @param version (required) Must be a valid semantic version (eg: `1.2.3` or `1.2.3-something` or `1.2.3-something.4`).
|
|
207
|
+
*/
|
|
208
|
+
set(version) {
|
|
209
|
+
return this.bump({ fullName: version });
|
|
210
|
+
}
|
|
211
|
+
/** Increments the major number of the semantic version for the current image definition.
|
|
212
|
+
*
|
|
213
|
+
* That is: the term `[major]` in the version format:
|
|
214
|
+
* ```
|
|
215
|
+
* [major].[minor].[patch]-[prereleaseName].[prereleaseNumber]
|
|
216
|
+
* ```
|
|
217
|
+
*
|
|
218
|
+
* eg: `1.2.3` becomes `2.0.0`
|
|
219
|
+
*
|
|
220
|
+
* eg: `1.2.3-my-branch.3` becomes `2.0.0`
|
|
221
|
+
*/
|
|
222
|
+
major() {
|
|
223
|
+
return this.bump({ major: true });
|
|
224
|
+
}
|
|
225
|
+
/** Increments the minor number of the semantic version for the current image definition.
|
|
226
|
+
*
|
|
227
|
+
* That is: the term `[minor]` in the version format:
|
|
228
|
+
* ```
|
|
229
|
+
* [major].[minor].[patch]-[prereleaseName].[prereleaseNumber]
|
|
230
|
+
* ```
|
|
231
|
+
*
|
|
232
|
+
* eg: `1.2.3` becomes `1.3.0`
|
|
233
|
+
*
|
|
234
|
+
* eg: `1.2.3-my-branch.3` becomes `1.3.0`
|
|
235
|
+
*/
|
|
236
|
+
minor(newValue) {
|
|
237
|
+
return this.bump({ minor: true });
|
|
238
|
+
}
|
|
239
|
+
/** Increments the patch number of the semantic version for the current image definition.
|
|
240
|
+
*
|
|
241
|
+
* That is: the term `[patch]` in the version format:
|
|
242
|
+
* ```
|
|
243
|
+
* [major].[minor].[patch]-[prereleaseName].[prereleaseNumber]
|
|
244
|
+
* ```
|
|
245
|
+
*
|
|
246
|
+
* eg: `1.2.3` becomes `1.2.4`
|
|
247
|
+
*
|
|
248
|
+
* eg: `1.2.3-my-branch.3` becomes `1.2.3`
|
|
249
|
+
*
|
|
250
|
+
* *(note: NOT 1.2.4 because prereleases lead up to a patch release, thus the term "cut a version")*
|
|
251
|
+
*/
|
|
252
|
+
patch() {
|
|
253
|
+
return this.bump({ patch: true });
|
|
254
|
+
}
|
|
255
|
+
/** Increments the prerelease of the semantic version for the current image definition.
|
|
256
|
+
* Passing in an alphanumeric prerelease name
|
|
257
|
+
* will prefix the number and delimit with a period (.).
|
|
258
|
+
*
|
|
259
|
+
* That is: the `[prereleaseName]` and `[prereleaseNumber]` terms in the version format:
|
|
260
|
+
* ```
|
|
261
|
+
* [major].[minor].[patch]-[prereleaseName].[prereleaseNumber]
|
|
262
|
+
* ```
|
|
263
|
+
*
|
|
264
|
+
* eg: without providing a name...
|
|
265
|
+
*
|
|
266
|
+
* `1.2.3` becomes `1.2.4-0`
|
|
267
|
+
*
|
|
268
|
+
* `1.2.3-my-branch.3` becomes `1.2.3-my-branch.4`
|
|
269
|
+
*
|
|
270
|
+
* `1.2.3-my-branch` becomes `1.2.3-my-branch.0`
|
|
271
|
+
*
|
|
272
|
+
* eg: providing "workitem-pdq" as name...
|
|
273
|
+
*
|
|
274
|
+
* `1.2.3` becomes `1.2.4-workitem-pdq.0`
|
|
275
|
+
*
|
|
276
|
+
* `1.2.3-workitem-pdq.0` becomes `1.2.3-workitem-pdq.1`
|
|
277
|
+
*
|
|
278
|
+
* `1.2.3-my-branch.3` becomes `1.2.3-workitem-pdq.0`
|
|
279
|
+
*
|
|
280
|
+
* `1.2.3-my-branch` becomes `1.2.3-workitem-pdq.0`
|
|
281
|
+
*/
|
|
282
|
+
prerelease(name) {
|
|
283
|
+
return this.bump({ prerelease: true, preId: name });
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
SemanticVersioner = tslib_1.__decorate([
|
|
287
|
+
(0, inversify_1.injectable)(),
|
|
288
|
+
tslib_1.__param(0, (0, inversify_1.inject)(codiac_common_1.INTERFACES.IBetterLogger)),
|
|
289
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
290
|
+
], SemanticVersioner);
|
|
291
|
+
exports.SemanticVersioner = SemanticVersioner;
|
|
292
|
+
//# sourceMappingURL=workspace-versioner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-versioner.js","sourceRoot":"","sources":["../../src/ops/workspace-versioner.ts"],"names":[],"mappings":";;;;AAAA,4DAAqE;AACrE,kEAAiE;AACjE,yCAA+C;AAC/C,8DAA6D;AAG7D,iDAA6C;AAC7C,iCAAiC;AAGjC,+GAA+G;AAExG,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAC4C,MAAqB,EAC3B,WAA+B;IACnE,kEAAkE;;QAFxB,WAAM,GAAN,MAAM,CAAe;QAC3B,gBAAW,GAAX,WAAW,CAAoB;QAGnE,IAAI,CAAC,SAAS,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAChD,CAAC;IAKD;;;;;;;OAOG;IACU,qBAAqB,CAAC,WAAwB,EAAE,GAAkB,EAAE,SAAsB;;YACrG,OAAO,IAAI,OAAO,CAAc,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE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"commands": {
|
|
4
4
|
"branch": {
|
|
5
5
|
"id": "branch",
|
|
@@ -150,6 +150,13 @@
|
|
|
150
150
|
"description": "Increments the prerelease number (using Major.Minor.Patch-PreRelease). NOTE: Increments the Patch version number when appending.",
|
|
151
151
|
"allowNo": false
|
|
152
152
|
},
|
|
153
|
+
"preid": {
|
|
154
|
+
"name": "preid",
|
|
155
|
+
"type": "option",
|
|
156
|
+
"char": "i",
|
|
157
|
+
"description": "Sets the prereleaseId and resets the prerelease number (or increments it if the same preid is already set) (using Major.Minor.Patch-PreId.PreRelease). NOTE: Increments the Patch version number when appending.",
|
|
158
|
+
"multiple": false
|
|
159
|
+
},
|
|
153
160
|
"clear": {
|
|
154
161
|
"name": "clear",
|
|
155
162
|
"type": "boolean",
|
|
@@ -3479,7 +3486,7 @@
|
|
|
3479
3486
|
"name": "buildParams",
|
|
3480
3487
|
"type": "option",
|
|
3481
3488
|
"char": "b",
|
|
3482
|
-
"description": "Additional freeform arguments to apply to the Docker build command.",
|
|
3489
|
+
"description": "Additional freeform arguments to apply to the Docker build command (as: arg=val, eg: -b \"--size=12\" -b \"--color=blue\").",
|
|
3483
3490
|
"required": false,
|
|
3484
3491
|
"multiple": true
|
|
3485
3492
|
}
|
|
@@ -3618,8 +3625,8 @@
|
|
|
3618
3625
|
"pluginAlias": "@codiac.io/codiac-cli",
|
|
3619
3626
|
"pluginType": "core",
|
|
3620
3627
|
"aliases": [
|
|
3621
|
-
"image:
|
|
3622
|
-
"img:
|
|
3628
|
+
"image:version:get",
|
|
3629
|
+
"img:version:get"
|
|
3623
3630
|
],
|
|
3624
3631
|
"flags": {
|
|
3625
3632
|
"help": {
|
|
@@ -4856,6 +4863,75 @@
|
|
|
4856
4863
|
"name"
|
|
4857
4864
|
]
|
|
4858
4865
|
},
|
|
4866
|
+
"images:version:bump": {
|
|
4867
|
+
"id": "images:version:bump",
|
|
4868
|
+
"description": "Output the local version a given image. useful for ci/cd automation.",
|
|
4869
|
+
"strict": true,
|
|
4870
|
+
"pluginName": "@codiac.io/codiac-cli",
|
|
4871
|
+
"pluginAlias": "@codiac.io/codiac-cli",
|
|
4872
|
+
"pluginType": "core",
|
|
4873
|
+
"aliases": [
|
|
4874
|
+
"image:version:bump",
|
|
4875
|
+
"img:version:bump"
|
|
4876
|
+
],
|
|
4877
|
+
"flags": {
|
|
4878
|
+
"help": {
|
|
4879
|
+
"name": "help",
|
|
4880
|
+
"type": "boolean",
|
|
4881
|
+
"char": "h",
|
|
4882
|
+
"description": "Show CLI help.",
|
|
4883
|
+
"allowNo": false
|
|
4884
|
+
},
|
|
4885
|
+
"version": {
|
|
4886
|
+
"name": "version",
|
|
4887
|
+
"type": "option",
|
|
4888
|
+
"description": "Overwrites the full version for the build (using Major.Minor.Patch).",
|
|
4889
|
+
"multiple": false
|
|
4890
|
+
},
|
|
4891
|
+
"major": {
|
|
4892
|
+
"name": "major",
|
|
4893
|
+
"type": "boolean",
|
|
4894
|
+
"char": "M",
|
|
4895
|
+
"description": "Increments the version by one Major version number (using Major.Minor.Patch).",
|
|
4896
|
+
"allowNo": false
|
|
4897
|
+
},
|
|
4898
|
+
"minor": {
|
|
4899
|
+
"name": "minor",
|
|
4900
|
+
"type": "boolean",
|
|
4901
|
+
"char": "m",
|
|
4902
|
+
"description": "Increments the version by one Minor version number (using Major.Minor.Patch).",
|
|
4903
|
+
"allowNo": false
|
|
4904
|
+
},
|
|
4905
|
+
"patch": {
|
|
4906
|
+
"name": "patch",
|
|
4907
|
+
"type": "boolean",
|
|
4908
|
+
"char": "p",
|
|
4909
|
+
"description": "Increments the version by one Patch version number (using Major.Minor.Patch).",
|
|
4910
|
+
"allowNo": false
|
|
4911
|
+
},
|
|
4912
|
+
"prerelease": {
|
|
4913
|
+
"name": "prerelease",
|
|
4914
|
+
"type": "boolean",
|
|
4915
|
+
"char": "r",
|
|
4916
|
+
"description": "(default for this command) Increments the prerelease number (using Major.Minor.Patch-PreRelease). NOTE: Increments the Patch version number when appending.",
|
|
4917
|
+
"allowNo": false
|
|
4918
|
+
},
|
|
4919
|
+
"preid": {
|
|
4920
|
+
"name": "preid",
|
|
4921
|
+
"type": "option",
|
|
4922
|
+
"char": "i",
|
|
4923
|
+
"description": "Sets the prereleaseId and resets the prerelease number (or increments it if the same preid is already set) (using Major.Minor.Patch-PreId.PreRelease). NOTE: Increments the Patch version number when appending.",
|
|
4924
|
+
"multiple": false
|
|
4925
|
+
}
|
|
4926
|
+
},
|
|
4927
|
+
"args": {
|
|
4928
|
+
"name": {
|
|
4929
|
+
"name": "name",
|
|
4930
|
+
"description": "Image name (as it appears in the codiac.json)",
|
|
4931
|
+
"required": true
|
|
4932
|
+
}
|
|
4933
|
+
}
|
|
4934
|
+
},
|
|
4859
4935
|
"noc:cluster:create": {
|
|
4860
4936
|
"id": "noc:cluster:create",
|
|
4861
4937
|
"description": "Provisions the physical cluster",
|
package/package.json
CHANGED