@getik-public/cli 1.5.1 → 1.5.2
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/CHANGELOG.md +4 -0
- package/README.md +6 -4
- package/package.json +1 -1
- package/src/web-build.js +19 -8
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -37,10 +37,12 @@ Example: `getik-cli mobile-build --platform ios --environment getik --upload`
|
|
|
37
37
|
Example: `getik-cli web-build -e getik --syncOnly`
|
|
38
38
|
Example: `getik-cli web-build -e getik`
|
|
39
39
|
|
|
40
|
-
| Option
|
|
41
|
-
|
|
42
|
-
| `-e`, `--environment` | YES | `<string>` | While environment can be any name, be consistent and use these: `getik`, `vbox`, `qa`, `preprod`, `prod`.
|
|
43
|
-
| `--syncOnly`
|
|
40
|
+
| Option | Required | Values | Description |
|
|
41
|
+
|-----------------------|----------|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
42
|
+
| `-e`, `--environment` | YES | `<string>` | While environment can be any name, be consistent and use these: `getik`, `vbox`, `qa`, `preprod`, `prod`. |
|
|
43
|
+
| `--syncOnly` | NO | `-` | For development only, it will create a file named `version.ts` with version found in `package.json`. Use this version in all `environment.ts` files. This will not go further to trigger the actual build script. |
|
|
44
|
+
| `--includeDemo` | NO | `-` | Use this flag to also include the demo build variant for the selected environment. |
|
|
45
|
+
| `--includeFallback` | NO | `-` | Use this flag to also include the fallback build variant for the selected environment. |
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
## <a name="upload-to-getik-cloud" href="#upload-to-getik-cloud">`upload-to-getik-cloud`</a>
|
package/package.json
CHANGED
package/src/web-build.js
CHANGED
|
@@ -20,7 +20,7 @@ function applyVersion(versions) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
fs.writeFileSync(pathToVersionsProperties, (
|
|
23
|
-
`export const version = {
|
|
23
|
+
`export const version = {
|
|
24
24
|
name: '${versions.versionName}',
|
|
25
25
|
code: ${versions.versionCode},
|
|
26
26
|
};
|
|
@@ -37,10 +37,16 @@ function cleanBuildFolder(folder) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
function buildApp(environmentName, callback) {
|
|
40
|
+
function buildApp(environmentName, versions, callback, extraConfig) {
|
|
41
|
+
console.log(extraConfig);
|
|
42
|
+
if (extraConfig?.falltrough) {
|
|
43
|
+
callback();
|
|
44
|
+
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
41
47
|
cleanBuildFolder('dist');
|
|
42
48
|
runCliCommand(`ng build --configuration=${environmentName}`, function() {
|
|
43
|
-
runCliCommand(`zip -q -r ../../${buildFolder}/${environmentName}.zip .`, function() {
|
|
49
|
+
runCliCommand(`zip -q -r ../../${buildFolder}/${environmentName}-${versions.versionName}.zip .`, function() {
|
|
44
50
|
callback();
|
|
45
51
|
}, './dist/browser');
|
|
46
52
|
});
|
|
@@ -52,6 +58,8 @@ export const webBuild = () => {
|
|
|
52
58
|
.command('web-build')
|
|
53
59
|
.option('-e, --environment <type>', 'Environment: getik, vbox, qa, preprod, prod')
|
|
54
60
|
.option('--syncOnly', 'Generates the version.ts file only so no errors when running app locally')
|
|
61
|
+
.option('--includeDemo', 'Also builds and zips the Demo variant for the selected environment')
|
|
62
|
+
.option('--includeFallback', 'Also builds and zips the Fallback variant for the selected environment')
|
|
55
63
|
.option('--force', 'Skip all checks for builds of type release')
|
|
56
64
|
.action((options) => {
|
|
57
65
|
console.log('INPUT OPTIONS: ', options);
|
|
@@ -62,11 +70,14 @@ export const webBuild = () => {
|
|
|
62
70
|
return;
|
|
63
71
|
}
|
|
64
72
|
applyReleaseBuildChecks(versions, options, () => {
|
|
65
|
-
buildApp(options.environment, () => {
|
|
66
|
-
const
|
|
67
|
-
buildApp(
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
buildApp(options.environment, versions, () => {
|
|
74
|
+
const fallbackEnvName = `${options.environment}Fallback`;
|
|
75
|
+
buildApp(fallbackEnvName, versions, () => {
|
|
76
|
+
const demoEnvName = `${options.environment}Demo`;
|
|
77
|
+
buildApp(demoEnvName, versions, () => {
|
|
78
|
+
console.log('\x1b[32m SUCCESS! \x1b[0m');
|
|
79
|
+
}, {falltrough: !options.includeDemo});
|
|
80
|
+
}, {falltrough: !options.includeFallback});
|
|
70
81
|
});
|
|
71
82
|
});
|
|
72
83
|
});
|