@commercetools-frontend/application-cli 1.1.1 → 1.2.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.
package/package.json
CHANGED
package/src/bin/cli.js
CHANGED
|
@@ -19,6 +19,7 @@ const cwd = process.cwd();
|
|
|
19
19
|
'application-assets-upload-script-out-file': 'upload-assets.sh',
|
|
20
20
|
'application-index-out-file': 'application.html',
|
|
21
21
|
'skip-menu': false,
|
|
22
|
+
'package-manager-name': 'yarn',
|
|
22
23
|
},
|
|
23
24
|
boolean: ['skip-menu'],
|
|
24
25
|
});
|
|
@@ -60,11 +61,12 @@ Command:
|
|
|
60
61
|
create-version Output a JSON string about the information in the 'version.json' for a deployment, including the updated list of rollbacks.
|
|
61
62
|
|
|
62
63
|
Options:
|
|
63
|
-
--version-url <url>
|
|
64
|
-
--build-revision <git-sha>
|
|
65
|
-
--build-number <url>
|
|
66
|
-
--rollbacks <int>
|
|
67
|
-
--out-file <path>
|
|
64
|
+
--version-url <url> (required) The path of an application's current 'version.json' within the storage bucket.
|
|
65
|
+
--build-revision <git-sha> (optional) The git commit SHA that needs to be deployed. Defaults to the 'CIRCLE_SHA1' environment variable.
|
|
66
|
+
--build-number <url> (optional) The number of a Continuous Integration build. Defaults to the 'CIRCLE_BUILD_NUM' environment variable.
|
|
67
|
+
--rollbacks <int> (optional) The number of max rollbacks to keep. Defaults to 5.
|
|
68
|
+
--out-file <path> (optional) The path to the file where to write the JSON. If not specified, the JSON is printed to stdout.
|
|
69
|
+
--package-manager-name <sring> (optional) Name of the binary of the used package manager (e.g. pnpm). Defaults to yarn.
|
|
68
70
|
`);
|
|
69
71
|
process.exit(0);
|
|
70
72
|
}
|
|
@@ -169,6 +169,7 @@ async function compileEnvironmentApplicationIndexes({
|
|
|
169
169
|
|
|
170
170
|
const applicationIndexUploadScriptContent =
|
|
171
171
|
createApplicationIndexUploadScript({
|
|
172
|
+
packageManagerName: cliFlags['package-manager-name'],
|
|
172
173
|
bucketUrl: getApplicationIndexBucketUrl({
|
|
173
174
|
bucketRegion,
|
|
174
175
|
prNumber: cliFlags['pr-number'],
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function createApplicationIndexUploadScript({
|
|
2
|
+
packageManagerName,
|
|
2
3
|
bucketUrl,
|
|
3
4
|
cdnUrl,
|
|
4
5
|
cloudEnvironment,
|
|
@@ -20,7 +21,7 @@ cp -z html \\
|
|
|
20
21
|
|
|
21
22
|
echo "Creating version.json and uploading it to bucket ${bucketUrl}"
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
${packageManagerName} application-cli create-version \\
|
|
24
25
|
--version-url=${cdnUrl}/${cloudEnvironment}/version.json \\
|
|
25
26
|
--build-revision=${buildRevision} \\
|
|
26
27
|
--build-number=${buildNumber} \\
|