oclif 2.0.0-dev.0 → 2.0.0-dev.1
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/.oclif.manifest.json +1 -1
- package/CHANGELOG.md +2 -14
- package/README.md +12 -12
- package/lib/commands/pack/macos.js +2 -2
- package/lib/commands/pack/win.js +1 -1
- package/lib/commands/upload/macos.js +4 -4
- package/lib/commands/upload/tarballs.js +3 -3
- package/lib/commands/upload/win.js +4 -4
- package/lib/tarballs/build.js +4 -4
- package/lib/tarballs/config.d.ts +0 -1
- package/lib/tarballs/config.js +0 -2
- package/lib/upload-util.js +1 -1
- package/package.json +3 -3
package/.oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.0.0-dev.
|
|
1
|
+
{"version":"2.0.0-dev.1","commands":{"generate":{"id":"generate","description":"generate a new CLI\nThis will clone the template repo 'oclif/hello-world' and update package properties","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"directory name of new project","required":true}]},"manifest":{"id":"manifest","description":"generates plugin manifest json","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"promote":{"id":"promote","description":"promote CLI builds to a S3 release channel","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to the oclif CLI project root","required":true,"multiple":false,"default":"."},"version":{"name":"version","type":"option","description":"semantic version of the CLI to promote","required":true,"multiple":false},"sha":{"name":"sha","type":"option","description":"7-digit short git commit SHA of the CLI to promote","required":true,"multiple":false},"channel":{"name":"channel","type":"option","description":"which channel to promote to","required":true,"multiple":false,"default":"stable"},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to promote (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"deb":{"name":"deb","type":"boolean","char":"d","description":"promote debian artifacts","allowNo":false},"macos":{"name":"macos","type":"boolean","char":"m","description":"promote macOS pkg","allowNo":false},"win":{"name":"win","type":"boolean","char":"w","description":"promote Windows exe","allowNo":false},"max-age":{"name":"max-age","type":"option","char":"a","description":"cache control max-age in seconds","multiple":false,"default":"86400"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true},"indexes":{"name":"indexes","type":"boolean","description":"append the promoted urls into the index files","allowNo":false}},"args":[]},"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n# Usage\n<!-- usage -->\n# Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"multiple":false,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[]},"pack:deb":{"id":"pack:deb","description":"pack CLI into debian package","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"pack:macos":{"id":"pack:macos","description":"pack CLI into macOS .pkg","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false}},"args":[]},"pack:tarballs":{"id":"pack:tarballs","description":"packages oclif CLI into tarballs\n\nThis can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to pack (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"xz":{"name":"xz","type":"boolean","description":"also build xz","allowNo":true}},"args":[]},"pack:win":{"id":"pack:win","description":"create windows installer from oclif CLI\n\n This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to be set in the environment","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false}},"args":[]},"upload:deb":{"id":"upload:deb","description":"upload deb package built with pack:deb","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"upload:macos":{"id":"upload:macos","description":"upload macos installers built with pack:macos","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"upload:tarballs":{"id":"upload:tarballs","description":"upload an oclif CLI to S3\n\n\"aws-sdk\" will need to be installed as a devDependency to upload.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to upload (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true}},"args":[]},"upload:win":{"id":"upload:win","description":"upload windows installers built with pack:win","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]}}}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,24 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
## [2.0.0-dev.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
* add additional executable to mac installer ([fefe2d9](https://github.com/oclif/oclif/commit/fefe2d90c87194d3a254a1bb16d32d3eaadd2d36))
|
|
11
|
-
* add additional executable to win installer ([f28639a](https://github.com/oclif/oclif/commit/f28639af361925c2878602b96cf5ab5415b3a72c))
|
|
5
|
+
## [2.0.0-dev.1](https://github.com/oclif/oclif/compare/v2.0.0-dev.0...v2.0.0-dev.1) (2021-11-01)
|
|
12
6
|
|
|
13
7
|
|
|
14
8
|
### Bug Fixes
|
|
15
9
|
|
|
16
|
-
*
|
|
17
|
-
* build and find tarballs using the same version ([66904a7](https://github.com/oclif/oclif/commit/66904a7180ed32e0e9152e4429358697af85af26))
|
|
18
|
-
* hide additional-cli flags ([4140b09](https://github.com/oclif/oclif/commit/4140b096de26cd319e24c19615f63387de311fe4))
|
|
19
|
-
* lint ([b23ceb2](https://github.com/oclif/oclif/commit/b23ceb2568a4d343f771269f20e1bb990deec588))
|
|
20
|
-
* tests ([d66b08c](https://github.com/oclif/oclif/commit/d66b08cb40fe9d1fb45e7dc6cb0dc07c468c19df))
|
|
21
|
-
* upload tarballs using same version as they were built with ([29e6c84](https://github.com/oclif/oclif/commit/29e6c84ba60648e6e5cdf2f16a12296a04f5bc8a))
|
|
22
|
-
* use same version to produce and upload macos pkg ([9114ca1](https://github.com/oclif/oclif/commit/9114ca1476da7c5c242f0a645460b99897412117))
|
|
10
|
+
* straighten out versions once and for all ([f1001a5](https://github.com/oclif/oclif/commit/f1001a5993a4c54e6e437b992eae69685e1a356f))
|
|
23
11
|
|
|
24
12
|
## [2.0.0-main.8](https://github.com/oclif/oclif/compare/v2.0.0-main.7...v2.0.0-main.8) (2021-10-08)
|
|
25
13
|
|
package/README.md
CHANGED
|
@@ -121,7 +121,7 @@ DESCRIPTION
|
|
|
121
121
|
This will clone the template repo 'oclif/hello-world' and update package properties
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
_See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
124
|
+
_See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/generate.ts)_
|
|
125
125
|
|
|
126
126
|
## `oclif help [COMMAND]`
|
|
127
127
|
|
|
@@ -158,7 +158,7 @@ DESCRIPTION
|
|
|
158
158
|
generates plugin manifest json
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
_See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
161
|
+
_See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/manifest.ts)_
|
|
162
162
|
|
|
163
163
|
## `oclif pack:deb`
|
|
164
164
|
|
|
@@ -175,7 +175,7 @@ DESCRIPTION
|
|
|
175
175
|
pack CLI into debian package
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
_See code: [src/commands/pack/deb.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
178
|
+
_See code: [src/commands/pack/deb.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/pack/deb.ts)_
|
|
179
179
|
|
|
180
180
|
## `oclif pack:macos`
|
|
181
181
|
|
|
@@ -192,7 +192,7 @@ DESCRIPTION
|
|
|
192
192
|
pack CLI into macOS .pkg
|
|
193
193
|
```
|
|
194
194
|
|
|
195
|
-
_See code: [src/commands/pack/macos.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
195
|
+
_See code: [src/commands/pack/macos.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/pack/macos.ts)_
|
|
196
196
|
|
|
197
197
|
## `oclif pack:tarballs`
|
|
198
198
|
|
|
@@ -214,7 +214,7 @@ DESCRIPTION
|
|
|
214
214
|
This can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
-
_See code: [src/commands/pack/tarballs.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
217
|
+
_See code: [src/commands/pack/tarballs.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/pack/tarballs.ts)_
|
|
218
218
|
|
|
219
219
|
## `oclif pack:win`
|
|
220
220
|
|
|
@@ -234,7 +234,7 @@ DESCRIPTION
|
|
|
234
234
|
be set in the environment
|
|
235
235
|
```
|
|
236
236
|
|
|
237
|
-
_See code: [src/commands/pack/win.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
237
|
+
_See code: [src/commands/pack/win.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/pack/win.ts)_
|
|
238
238
|
|
|
239
239
|
## `oclif promote`
|
|
240
240
|
|
|
@@ -263,7 +263,7 @@ DESCRIPTION
|
|
|
263
263
|
promote CLI builds to a S3 release channel
|
|
264
264
|
```
|
|
265
265
|
|
|
266
|
-
_See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
266
|
+
_See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/promote.ts)_
|
|
267
267
|
|
|
268
268
|
## `oclif readme`
|
|
269
269
|
|
|
@@ -293,7 +293,7 @@ DESCRIPTION
|
|
|
293
293
|
Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
|
|
294
294
|
```
|
|
295
295
|
|
|
296
|
-
_See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
296
|
+
_See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/readme.ts)_
|
|
297
297
|
|
|
298
298
|
## `oclif upload:deb`
|
|
299
299
|
|
|
@@ -310,7 +310,7 @@ DESCRIPTION
|
|
|
310
310
|
upload deb package built with pack:deb
|
|
311
311
|
```
|
|
312
312
|
|
|
313
|
-
_See code: [src/commands/upload/deb.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
313
|
+
_See code: [src/commands/upload/deb.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/upload/deb.ts)_
|
|
314
314
|
|
|
315
315
|
## `oclif upload:macos`
|
|
316
316
|
|
|
@@ -327,7 +327,7 @@ DESCRIPTION
|
|
|
327
327
|
upload macos installers built with pack:macos
|
|
328
328
|
```
|
|
329
329
|
|
|
330
|
-
_See code: [src/commands/upload/macos.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
330
|
+
_See code: [src/commands/upload/macos.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/upload/macos.ts)_
|
|
331
331
|
|
|
332
332
|
## `oclif upload:tarballs`
|
|
333
333
|
|
|
@@ -349,7 +349,7 @@ DESCRIPTION
|
|
|
349
349
|
"aws-sdk" will need to be installed as a devDependency to upload.
|
|
350
350
|
```
|
|
351
351
|
|
|
352
|
-
_See code: [src/commands/upload/tarballs.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
352
|
+
_See code: [src/commands/upload/tarballs.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/upload/tarballs.ts)_
|
|
353
353
|
|
|
354
354
|
## `oclif upload:win`
|
|
355
355
|
|
|
@@ -366,7 +366,7 @@ DESCRIPTION
|
|
|
366
366
|
upload windows installers built with pack:win
|
|
367
367
|
```
|
|
368
368
|
|
|
369
|
-
_See code: [src/commands/upload/win.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.
|
|
369
|
+
_See code: [src/commands/upload/win.ts](https://github.com/oclif/oclif/blob/v2.0.0-dev.1/src/commands/upload/win.ts)_
|
|
370
370
|
<!-- commandsstop -->
|
|
371
371
|
|
|
372
372
|
# 🏭 Related Repositories
|
|
@@ -107,7 +107,7 @@ class PackMacos extends core_1.Command {
|
|
|
107
107
|
const macos = c.macos;
|
|
108
108
|
const packageIdentifier = macos.identifier;
|
|
109
109
|
await Tarballs.build(buildConfig, { platform: 'darwin', pack: false });
|
|
110
|
-
const templateKey = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version:
|
|
110
|
+
const templateKey = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version: config.version, sha: buildConfig.gitSha });
|
|
111
111
|
const dist = buildConfig.dist(`macos/${templateKey}`);
|
|
112
112
|
await qq.emptyDir(path.dirname(dist));
|
|
113
113
|
const scriptsDir = qq.join(buildConfig.tmp, 'macos/scripts');
|
|
@@ -125,7 +125,7 @@ class PackMacos extends core_1.Command {
|
|
|
125
125
|
const args = [
|
|
126
126
|
'--root', rootDir,
|
|
127
127
|
'--identifier', packageIdentifier,
|
|
128
|
-
'--version',
|
|
128
|
+
'--version', config.version,
|
|
129
129
|
'--install-location', `/usr/local/lib/${config.dirname}`,
|
|
130
130
|
'--scripts', scriptsDir,
|
|
131
131
|
];
|
package/lib/commands/pack/win.js
CHANGED
|
@@ -214,7 +214,7 @@ class PackWin extends core_1.Command {
|
|
|
214
214
|
await qq.mv(buildConfig.workspace({ platform: 'win32', arch }), [installerBase, 'client']);
|
|
215
215
|
// eslint-disable-next-line no-await-in-loop
|
|
216
216
|
await qq.x(`makensis ${installerBase}/${config.bin}.nsi | grep -v "\\[compress\\]" | grep -v "^File: Descending to"`);
|
|
217
|
-
const templateKey = (0, upload_util_1.templateShortKey)('win32', { bin: config.bin, version:
|
|
217
|
+
const templateKey = (0, upload_util_1.templateShortKey)('win32', { bin: config.bin, version: config.version, sha: buildConfig.gitSha, arch });
|
|
218
218
|
const o = buildConfig.dist(`win32/${templateKey}`);
|
|
219
219
|
// eslint-disable-next-line no-await-in-loop
|
|
220
220
|
await qq.mv([installerBase, 'installer.exe'], o);
|
|
@@ -10,13 +10,13 @@ class UploadMacos extends core_1.Command {
|
|
|
10
10
|
async run() {
|
|
11
11
|
const { flags } = await this.parse(UploadMacos);
|
|
12
12
|
const buildConfig = await Tarballs.buildConfig(flags.root);
|
|
13
|
-
const { s3Config,
|
|
13
|
+
const { s3Config, config, dist } = buildConfig;
|
|
14
14
|
const S3Options = {
|
|
15
15
|
Bucket: s3Config.bucket,
|
|
16
16
|
ACL: s3Config.acl || 'public-read',
|
|
17
17
|
};
|
|
18
|
-
const cloudKeyBase = (0, upload_util_1.commitAWSDir)(version, buildConfig.gitSha, s3Config);
|
|
19
|
-
const templateKey = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version, sha: buildConfig.gitSha });
|
|
18
|
+
const cloudKeyBase = (0, upload_util_1.commitAWSDir)(config.version, buildConfig.gitSha, s3Config);
|
|
19
|
+
const templateKey = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version: config.version, sha: buildConfig.gitSha });
|
|
20
20
|
const cloudKey = `${cloudKeyBase}/${templateKey}`;
|
|
21
21
|
const localPkg = dist(`macos/${templateKey}`);
|
|
22
22
|
if (await qq.exists(localPkg))
|
|
@@ -25,7 +25,7 @@ class UploadMacos extends core_1.Command {
|
|
|
25
25
|
this.error('Cannot find macOS pkg', {
|
|
26
26
|
suggestions: ['Run "oclif-dev pack:macos" before uploading'],
|
|
27
27
|
});
|
|
28
|
-
(0, log_1.log)(`done uploading macos pkg for v${version}-${buildConfig.gitSha}`);
|
|
28
|
+
(0, log_1.log)(`done uploading macos pkg for v${config.version}-${buildConfig.gitSha}`);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
exports.default = UploadMacos;
|
|
@@ -13,7 +13,7 @@ class UploadTarballs extends core_1.Command {
|
|
|
13
13
|
throw new Error('upload does not function on windows');
|
|
14
14
|
const targets = flags.targets.split(',');
|
|
15
15
|
const buildConfig = await Tarballs.buildConfig(flags.root, { targets, xz: flags.xz });
|
|
16
|
-
const { s3Config, dist,
|
|
16
|
+
const { s3Config, dist, config, xz } = buildConfig;
|
|
17
17
|
// fail early if targets are not built
|
|
18
18
|
for (const target of buildConfig.targets) {
|
|
19
19
|
const tarball = dist((0, upload_util_1.templateShortKey)('versioned', Object.assign({ ext: '.tar.gz', bin: config.bin, version: config.version, sha: buildConfig.gitSha }, target)));
|
|
@@ -37,7 +37,7 @@ class UploadTarballs extends core_1.Command {
|
|
|
37
37
|
sha: buildConfig.gitSha,
|
|
38
38
|
version: config.version,
|
|
39
39
|
});
|
|
40
|
-
const cloudKey = `${(0, upload_util_1.commitAWSDir)(version, buildConfig.gitSha, s3Config)}/${localKey}`;
|
|
40
|
+
const cloudKey = `${(0, upload_util_1.commitAWSDir)(config.version, buildConfig.gitSha, s3Config)}/${localKey}`;
|
|
41
41
|
await aws_1.default.s3.uploadFile(dist(localKey), Object.assign(Object.assign({}, TarballS3Options), { ContentType: 'application/gzip', Key: cloudKey }));
|
|
42
42
|
};
|
|
43
43
|
await releaseTarballs('.tar.gz');
|
|
@@ -51,7 +51,7 @@ class UploadTarballs extends core_1.Command {
|
|
|
51
51
|
sha: buildConfig.gitSha,
|
|
52
52
|
version: config.version,
|
|
53
53
|
});
|
|
54
|
-
const cloudKey = `${(0, upload_util_1.commitAWSDir)(version, buildConfig.gitSha, s3Config)}/${manifest}`;
|
|
54
|
+
const cloudKey = `${(0, upload_util_1.commitAWSDir)(config.version, buildConfig.gitSha, s3Config)}/${manifest}`;
|
|
55
55
|
await aws_1.default.s3.uploadFile(dist(manifest), Object.assign(Object.assign({}, ManifestS3Options), { Key: cloudKey }));
|
|
56
56
|
};
|
|
57
57
|
if (targets.length > 0)
|
|
@@ -10,14 +10,14 @@ class UploadWin extends core_1.Command {
|
|
|
10
10
|
async run() {
|
|
11
11
|
const { flags } = await this.parse(UploadWin);
|
|
12
12
|
const buildConfig = await Tarballs.buildConfig(flags.root);
|
|
13
|
-
const { s3Config,
|
|
13
|
+
const { s3Config, config, dist } = buildConfig;
|
|
14
14
|
const S3Options = {
|
|
15
15
|
Bucket: s3Config.bucket,
|
|
16
16
|
ACL: s3Config.acl || 'public-read',
|
|
17
17
|
};
|
|
18
18
|
const archs = buildConfig.targets.filter(t => t.platform === 'win32').map(t => t.arch);
|
|
19
19
|
for (const arch of archs) {
|
|
20
|
-
const templateKey = (0, upload_util_1.templateShortKey)('win32', { bin: config.bin, version:
|
|
20
|
+
const templateKey = (0, upload_util_1.templateShortKey)('win32', { bin: config.bin, version: config.version, sha: buildConfig.gitSha, arch });
|
|
21
21
|
const localKey = dist(`win32/${templateKey}`);
|
|
22
22
|
// eslint-disable-next-line no-await-in-loop
|
|
23
23
|
if (!await qq.exists(localKey))
|
|
@@ -27,7 +27,7 @@ class UploadWin extends core_1.Command {
|
|
|
27
27
|
}
|
|
28
28
|
const cloudKeyBase = (0, upload_util_1.commitAWSDir)(config.pjson.version, buildConfig.gitSha, s3Config);
|
|
29
29
|
const uploadWin = async (arch) => {
|
|
30
|
-
const templateKey = (0, upload_util_1.templateShortKey)('win32', { bin: config.bin, version:
|
|
30
|
+
const templateKey = (0, upload_util_1.templateShortKey)('win32', { bin: config.bin, version: config.version, sha: buildConfig.gitSha, arch });
|
|
31
31
|
const localExe = dist(`win32/${templateKey}`);
|
|
32
32
|
const cloudKey = `${cloudKeyBase}/${templateKey}`;
|
|
33
33
|
if (await qq.exists(localExe))
|
|
@@ -35,7 +35,7 @@ class UploadWin extends core_1.Command {
|
|
|
35
35
|
};
|
|
36
36
|
await uploadWin('x64');
|
|
37
37
|
await uploadWin('x86');
|
|
38
|
-
(0, log_1.log)(`done uploading windows executables for v${version}-${buildConfig.gitSha}`);
|
|
38
|
+
(0, log_1.log)(`done uploading windows executables for v${config.version}-${buildConfig.gitSha}`);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.default = UploadWin;
|
package/lib/tarballs/build.js
CHANGED
|
@@ -40,7 +40,7 @@ async function build(c, options = {}) {
|
|
|
40
40
|
const updatePJSON = async () => {
|
|
41
41
|
qq.cd(c.workspace());
|
|
42
42
|
const pjson = await qq.readJSON('package.json');
|
|
43
|
-
pjson.version =
|
|
43
|
+
pjson.version = config.version;
|
|
44
44
|
pjson.oclif.update = pjson.oclif.update || {};
|
|
45
45
|
pjson.oclif.update.s3 = pjson.oclif.update.s3 || {};
|
|
46
46
|
pjson.oclif.update.s3.bucket = c.s3Config.bucket;
|
|
@@ -110,11 +110,11 @@ async function build(c, options = {}) {
|
|
|
110
110
|
if (!c.updateConfig.s3.host)
|
|
111
111
|
return;
|
|
112
112
|
const rollout = (typeof c.updateConfig.autoupdate === 'object' && c.updateConfig.autoupdate.rollout);
|
|
113
|
-
const gzCloudKey = `${(0, upload_util_1.commitAWSDir)(
|
|
114
|
-
const xzCloudKey = `${(0, upload_util_1.commitAWSDir)(
|
|
113
|
+
const gzCloudKey = `${(0, upload_util_1.commitAWSDir)(config.version, c.gitSha, c.updateConfig.s3)}/${gzLocalKey}`;
|
|
114
|
+
const xzCloudKey = `${(0, upload_util_1.commitAWSDir)(config.version, c.gitSha, c.updateConfig.s3)}/${xzLocalKey}`;
|
|
115
115
|
const manifest = {
|
|
116
116
|
rollout: rollout === false ? undefined : rollout,
|
|
117
|
-
version:
|
|
117
|
+
version: config.version,
|
|
118
118
|
sha: c.gitSha,
|
|
119
119
|
baseDir: (0, upload_util_1.templateShortKey)('baseDir', target, { bin: c.config.bin }),
|
|
120
120
|
gz: config.s3Url(gzCloudKey),
|
package/lib/tarballs/config.d.ts
CHANGED
package/lib/tarballs/config.js
CHANGED
|
@@ -27,7 +27,6 @@ async function buildConfig(root, options = {}) {
|
|
|
27
27
|
const config = await core_1.Config.load({ root: path.resolve(root), devPlugins: false, userPlugins: false });
|
|
28
28
|
root = config.root;
|
|
29
29
|
const _gitSha = await gitSha(root, { short: true });
|
|
30
|
-
const version = config.version.includes('-') ? `${config.version}.${_gitSha}` : config.version;
|
|
31
30
|
// eslint-disable-next-line new-cap
|
|
32
31
|
const tmp = await Tmp(config);
|
|
33
32
|
const updateConfig = config.pjson.oclif.update || {};
|
|
@@ -38,7 +37,6 @@ async function buildConfig(root, options = {}) {
|
|
|
38
37
|
config,
|
|
39
38
|
tmp,
|
|
40
39
|
updateConfig,
|
|
41
|
-
version,
|
|
42
40
|
xz: typeof options.xz === 'boolean' ? options.xz : Boolean(updateConfig.s3.xz),
|
|
43
41
|
dist: (...args) => path.join(config.root, 'dist', ...args),
|
|
44
42
|
s3Config: updateConfig.s3,
|
package/lib/upload-util.js
CHANGED
|
@@ -49,7 +49,7 @@ function debArch(arch) {
|
|
|
49
49
|
}
|
|
50
50
|
exports.debArch = debArch;
|
|
51
51
|
function debVersion(buildConfig) {
|
|
52
|
-
return `${buildConfig.version.split('-')[0]}.${buildConfig.gitSha}-1`;
|
|
52
|
+
return `${buildConfig.config.version.split('-')[0]}.${buildConfig.gitSha}-1`;
|
|
53
53
|
// see debian_revision: https://www.debian.org/doc/debian-policy/ch-controlfields.html
|
|
54
54
|
}
|
|
55
55
|
exports.debVersion = debVersion;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oclif",
|
|
3
3
|
"description": "oclif: create your own CLI",
|
|
4
|
-
"version": "2.0.0-dev.
|
|
4
|
+
"version": "2.0.0-dev.1",
|
|
5
5
|
"author": "Jeff Dickey @jdxcode",
|
|
6
6
|
"bin": {
|
|
7
7
|
"oclif": "bin/run"
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"postpack": "shx rm .oclif.manifest.json",
|
|
124
124
|
"posttest": "yarn run lint",
|
|
125
125
|
"prepack": "shx rm -rf lib && tsc && bin/dev manifest .",
|
|
126
|
-
"
|
|
127
|
-
"
|
|
126
|
+
"test": "nps test",
|
|
127
|
+
"version": "bin/dev readme && git add README.md"
|
|
128
128
|
},
|
|
129
129
|
"publishConfig": {
|
|
130
130
|
"registry": "https://registry.npmjs.org"
|