@24i/smartapps-bigscreen-rnv-build-engine 0.17.6-alpha.1 → 0.17.6-alpha.10
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 +6 -6
- package/dist/src/__tests__/resolvers/resolveBuildEnvType.spec.js +23 -0
- package/dist/src/constants/buildEnvironments.js +9 -0
- package/dist/src/constants/buildProductionPackages.js +9 -0
- package/dist/src/constants/delopyLivePlatforms.js +13 -0
- package/dist/src/constants/index.js +3 -1
- package/dist/src/resolvers/index.js +6 -1
- package/dist/src/resolvers/resolveBaseUrl.js +11 -1
- package/dist/src/resolvers/resolveBuildEnvName.js +7 -14
- package/dist/src/resolvers/resolveBuildEnvType.js +23 -0
- package/dist/src/resolvers/resolveDeployLocations.js +3 -6
- package/dist/src/resolvers/resolveGenericRnvConfig.js +9 -2
- package/dist/src/resolvers/resolveProductionZipFileRelativePath.js +36 -0
- package/dist/src/resolvers/resolveSupportedFlavoursForPlatform.js +8 -0
- package/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +25 -1
- package/dist/src/scripts/buildAllWithSchemes.js +88 -0
- package/dist/src/scripts/buildProductionPackagesAll.js +75 -0
- package/dist/src/scripts/deployLiveAll.js +27 -0
- package/dist/src/scripts/deployLivePlatform.js +44 -0
- package/dist/src/scripts/generateDeployUrls/makeTableDataByScheme.js +1 -1
- package/dist/src/scripts/release/appCenter/appCenter.js +17 -0
- package/dist/src/scripts/release/appCenter/deployProductionPackagesToAppCenter.js +117 -0
- package/dist/src/scripts/release/{deployToAppCenter.js → appCenter/deployToAppCenter.js} +6 -17
- package/dist/src/scripts/release/notifySlack/notifySlack.js +11 -8
- package/dist/src/scripts/release/sentryRelease.js +11 -5
- package/dist/src/scripts/releaseAllWithScheme.js +4 -4
- package/dist/src/scripts/releaseAllWithSchemes.js +158 -0
- package/dist/src/scripts/releaseProductionPackagesAll.js +13 -0
- package/dist/src/sdks/sdk-androidtv/sdkAndroidtv.js +16 -6
- package/dist/src/sdks/sdk-tizen/sdkTizen.js +3 -0
- package/dist/src/sdks/sdk-webos/sdkWebos.js +3 -0
- package/dist/src/sdks/sdk-webpack/sdkWebpack.js +23 -3
- package/dist/src/tasks/deploy/aswS3/aws.js +21 -3
- package/dist/src/tasks/deploy/aswS3/deployS3.js +8 -2
- package/dist/src/tasks/deploy/aswS3/distToLiveS3.js +76 -0
- package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +7 -1
- package/dist/src/tasks/task.rnv.build.js +10 -1
- package/dist/src/tasks/task.rnv.deploy.js +10 -1
- package/dist/src/utils/copyEnvironmentFolder.js +65 -0
- package/dist/src/utils/forEachSupportedPlatformFlavour.js +29 -7
- package/dist/src/utils/getSafeSchemeString.js +7 -0
- package/dist/src/utils/zipBuildsByPlatforms.js +8 -5
- package/dist/src/utils/zipStagingProdBuildsByPlatforms.js +114 -0
- package/dist/templates/platforms/_shared/webpack.base.js +2 -2
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/bridge/BridgeFromJavaScript.kt +44 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/model/MediaEventType.kt +3 -1
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/viewmodel/WebViewModel.kt +11 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -88,8 +88,8 @@ drivers/
|
|
|
88
88
|
| **release:staging:dist** | staging | By CI on merge any pull request into `master` branch |
|
|
89
89
|
| **release:prod:dist** | production | By CI on merge pull request into `master` branch |
|
|
90
90
|
|
|
91
|
-
### Schemes with
|
|
92
|
-
Scheme names with
|
|
91
|
+
### Schemes with `:latest` postfix
|
|
92
|
+
Scheme names with `:latest` postfix **always deploys into the same location**.
|
|
93
93
|
In other words, app url is the same for each deployed build.
|
|
94
94
|
|
|
95
95
|
An example:
|
|
@@ -99,8 +99,8 @@ http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<
|
|
|
99
99
|
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/latest/release/<ENVIRONMENT>/...
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
### `release:
|
|
103
|
-
The difference from schemes with [
|
|
102
|
+
### `release:[staging/prod]:dist` scheme
|
|
103
|
+
The difference from schemes with [`:latest` postfix](#schemes-with-latest-postfix)
|
|
104
104
|
is that new builds are not deployed to the same remote folder all the time.
|
|
105
105
|
Instead, a new folder is created for each new app version.
|
|
106
106
|
|
|
@@ -125,13 +125,13 @@ Currently, following variable names are configured for replacing:
|
|
|
125
125
|
| **WEBPACK_INJECTION_APP_TITLE** | string | app title (used in app ui) | `'Appstage'`, `'Pure Flix'` |
|
|
126
126
|
| **WEBPACK_INJECTION_APP_CONFIG_ID** | string | flavour id *(value of rnv CLI `-c` param value)* | `'animated_1080'`, `'basic_720'` |
|
|
127
127
|
| **WEBPACK_INJECTION_APP_CREATED** | string | build time in ISO 8601 format | `'2021-07-30T09:18:26.014Z'` |
|
|
128
|
-
| **WEBPACK_INJECTION_APP_SCHEME** | string | scheme used during the build | `'debug'`, `'rc:latest'
|
|
128
|
+
| **WEBPACK_INJECTION_APP_SCHEME** | string | scheme used during the build | `'debug'`, `'rc:prod:latest'` |
|
|
129
129
|
| **WEBPACK_INJECTION_APP_RESOLUTION** | string | app resolution in `<WIDTH>x<HEIGHT>` format (in pixels) | `'1920x1080'`, `'1280x720'` |
|
|
130
130
|
| **WEBPACK_INJECTION_APP_VERSION** | string | app version | `'v0.0.1.dev'`, `'v0.0.1.rc-1'`, `'v0.0.1'` |
|
|
131
131
|
| **WEBPACK_INJECTION_APP_ENVIRONMENT** | string | environment used during the build | `'development'`, `'production'` |
|
|
132
132
|
| **WEBPACK_INJECTION_APP_PLATFORM** | string | platform id *(value of rnv CLI `-p` param value)* | `'webtv'`, `'webos'`, `'tizen'`, `'entone'` |
|
|
133
133
|
| **WEBPACK_INJECTION_APP_CONTENT_PATH** | string | path to content directory | `'./public/content'` |
|
|
134
|
-
| **WEBPACK_INJECTION_APP_CORE_VERSIONS** | string | version of the core packages | `'SDK: 1.0.5'`, `'WL: 1.0.6-alpha.2146'`
|
|
134
|
+
| **WEBPACK_INJECTION_APP_CORE_VERSIONS** | string | version of the core packages | `'SDK: 1.0.5'`, `'WL: 1.0.6-alpha.2146'` |
|
|
135
135
|
|
|
136
136
|
An example:
|
|
137
137
|
```typescript
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const constants_1 = require("../../constants");
|
|
4
|
+
const resolveBuildEnvType_1 = require("../../resolvers/resolveBuildEnvType");
|
|
5
|
+
describe('resolveBuildEnvType', () => {
|
|
6
|
+
it.each([
|
|
7
|
+
[constants_1.BuildSchemes.DEBUG, constants_1.BuildEnvironments.DEV],
|
|
8
|
+
[constants_1.BuildSchemes.DEV, constants_1.BuildEnvironments.DEV],
|
|
9
|
+
[constants_1.BuildSchemes.DEV_LATEST, constants_1.BuildEnvironments.DEV],
|
|
10
|
+
[constants_1.BuildSchemes.RC_STAGING, constants_1.BuildEnvironments.STAGING],
|
|
11
|
+
[constants_1.BuildSchemes.RC_PROD, constants_1.BuildEnvironments.PROD],
|
|
12
|
+
[constants_1.BuildSchemes.RC_STAGING_LATEST, constants_1.BuildEnvironments.STAGING],
|
|
13
|
+
[constants_1.BuildSchemes.RC_PROD_LATEST, constants_1.BuildEnvironments.PROD],
|
|
14
|
+
[constants_1.BuildSchemes.RELEASE_STAGING, constants_1.BuildEnvironments.STAGING],
|
|
15
|
+
[constants_1.BuildSchemes.RELEASE_PROD, constants_1.BuildEnvironments.PROD],
|
|
16
|
+
[constants_1.BuildSchemes.RELEASE_STAGING_LATEST, constants_1.BuildEnvironments.STAGING],
|
|
17
|
+
[constants_1.BuildSchemes.RELEASE_PROD_LATEST, constants_1.BuildEnvironments.PROD],
|
|
18
|
+
[constants_1.BuildSchemes.RELEASE_STAGING_DIST, constants_1.BuildEnvironments.STAGING],
|
|
19
|
+
[constants_1.BuildSchemes.RELEASE_PROD_DIST, constants_1.BuildEnvironments.PROD],
|
|
20
|
+
])('scheme "%s" has environment type "%s"', (scheme, envType) => {
|
|
21
|
+
expect((0, resolveBuildEnvType_1.resolveBuildEnvType)(scheme)).toBe(envType);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUPPORTED_PACKAGE_PLATFORMS = void 0;
|
|
4
|
+
const platforms_1 = require("./platforms");
|
|
5
|
+
exports.SUPPORTED_PACKAGE_PLATFORMS = [
|
|
6
|
+
platforms_1.Platforms.ANDROIDTV,
|
|
7
|
+
platforms_1.Platforms.TIZEN,
|
|
8
|
+
platforms_1.Platforms.WEBOS,
|
|
9
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NO_CONTENT_FOLDER_PLATFORMS = exports.UNSUPPORTED_PLATFORMS = void 0;
|
|
4
|
+
const platforms_1 = require("./platforms");
|
|
5
|
+
const UNSUPPORTED_PLATFORMS = [
|
|
6
|
+
platforms_1.Platforms.WEBTV,
|
|
7
|
+
];
|
|
8
|
+
exports.UNSUPPORTED_PLATFORMS = UNSUPPORTED_PLATFORMS;
|
|
9
|
+
const NO_CONTENT_FOLDER_PLATFORMS = [
|
|
10
|
+
platforms_1.Platforms.VIDAA,
|
|
11
|
+
platforms_1.Platforms.ANDROIDTV,
|
|
12
|
+
];
|
|
13
|
+
exports.NO_CONTENT_FOLDER_PLATFORMS = NO_CONTENT_FOLDER_PLATFORMS;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Platforms = exports.BuildSchemes = void 0;
|
|
3
|
+
exports.Platforms = exports.BuildEnvironments = exports.BuildSchemes = void 0;
|
|
4
4
|
var buildSchemes_1 = require("./buildSchemes");
|
|
5
5
|
Object.defineProperty(exports, "BuildSchemes", { enumerable: true, get: function () { return buildSchemes_1.BuildSchemes; } });
|
|
6
|
+
var buildEnvironments_1 = require("./buildEnvironments");
|
|
7
|
+
Object.defineProperty(exports, "BuildEnvironments", { enumerable: true, get: function () { return buildEnvironments_1.BuildEnvironments; } });
|
|
6
8
|
var platforms_1 = require("./platforms");
|
|
7
9
|
Object.defineProperty(exports, "Platforms", { enumerable: true, get: function () { return platforms_1.Platforms; } });
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveZippedPlatformBuildsRelativeFilePath = exports.resolvePackageVersions = exports.resolveBuildFileExtension = exports.resolveUsedFlavours = exports.resolveSupportedPlatforms = exports.getBaseConfig = exports.resolveBuildFileName = exports.resolveBuildFileBaseName = exports.resolveHbbtvDeployConfig = exports.resolveHbbtvDeployUrl = exports.resolveHbbtvRemoteBuildDirRelativePath = exports.resolveDeployLocations = exports.resolveBuildVersionOffset = exports.resolveBuildVersion = exports.resolveBuildEnvName = exports.resolveBaseUrl = void 0;
|
|
3
|
+
exports.getProductionZipFileRelativePath = exports.resolveZippedPlatformBuildsRelativeFilePath = exports.resolvePackageVersions = exports.resolveBuildFileExtension = exports.resolveUsedFlavours = exports.resolveSupportedFlavoursForPlatform = exports.resolveSupportedPlatforms = exports.getBaseConfig = exports.resolveBuildFileName = exports.resolveBuildFileBaseName = exports.resolveHbbtvDeployConfig = exports.resolveHbbtvDeployUrl = exports.resolveHbbtvRemoteBuildDirRelativePath = exports.resolveDeployLocations = exports.resolveBuildVersionOffset = exports.resolveBuildVersion = exports.resolveBuildEnvName = exports.resolveProductionPackagesBaseUrl = exports.resolveBaseUrl = void 0;
|
|
4
4
|
var resolveBaseUrl_1 = require("./resolveBaseUrl");
|
|
5
5
|
Object.defineProperty(exports, "resolveBaseUrl", { enumerable: true, get: function () { return resolveBaseUrl_1.resolveBaseUrl; } });
|
|
6
|
+
Object.defineProperty(exports, "resolveProductionPackagesBaseUrl", { enumerable: true, get: function () { return resolveBaseUrl_1.resolveProductionPackagesBaseUrl; } });
|
|
6
7
|
var resolveBuildEnvName_1 = require("./resolveBuildEnvName");
|
|
7
8
|
Object.defineProperty(exports, "resolveBuildEnvName", { enumerable: true, get: function () { return resolveBuildEnvName_1.resolveBuildEnvName; } });
|
|
8
9
|
var resolveBuildVersion_1 = require("./resolveBuildVersion");
|
|
@@ -25,6 +26,8 @@ var resolveGenericRnvConfig_1 = require("./resolveGenericRnvConfig");
|
|
|
25
26
|
Object.defineProperty(exports, "getBaseConfig", { enumerable: true, get: function () { return resolveGenericRnvConfig_1.getBaseConfig; } });
|
|
26
27
|
var resolveSupportedPlatforms_1 = require("./resolveSupportedPlatforms");
|
|
27
28
|
Object.defineProperty(exports, "resolveSupportedPlatforms", { enumerable: true, get: function () { return resolveSupportedPlatforms_1.resolveSupportedPlatforms; } });
|
|
29
|
+
var resolveSupportedFlavoursForPlatform_1 = require("./resolveSupportedFlavoursForPlatform");
|
|
30
|
+
Object.defineProperty(exports, "resolveSupportedFlavoursForPlatform", { enumerable: true, get: function () { return resolveSupportedFlavoursForPlatform_1.resolveSupportedFlavoursForPlatform; } });
|
|
28
31
|
var resolveUsedFlavours_1 = require("./resolveUsedFlavours");
|
|
29
32
|
Object.defineProperty(exports, "resolveUsedFlavours", { enumerable: true, get: function () { return resolveUsedFlavours_1.resolveUsedFlavours; } });
|
|
30
33
|
var resolveBuildFileExtension_1 = require("./resolveBuildFileExtension");
|
|
@@ -33,3 +36,5 @@ var resolvePackageVersions_1 = require("./resolvePackageVersions");
|
|
|
33
36
|
Object.defineProperty(exports, "resolvePackageVersions", { enumerable: true, get: function () { return resolvePackageVersions_1.resolvePackageVersions; } });
|
|
34
37
|
var resolveZippedPlatformBuildsRelativeFilePath_1 = require("./resolveZippedPlatformBuildsRelativeFilePath");
|
|
35
38
|
Object.defineProperty(exports, "resolveZippedPlatformBuildsRelativeFilePath", { enumerable: true, get: function () { return resolveZippedPlatformBuildsRelativeFilePath_1.resolveZippedPlatformBuildsRelativeFilePath; } });
|
|
39
|
+
var resolveProductionZipFileRelativePath_1 = require("./resolveProductionZipFileRelativePath");
|
|
40
|
+
Object.defineProperty(exports, "getProductionZipFileRelativePath", { enumerable: true, get: function () { return resolveProductionZipFileRelativePath_1.getProductionZipFileRelativePath; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveBaseUrl = void 0;
|
|
3
|
+
exports.resolveProductionPackagesBaseUrl = exports.resolveBaseUrl = void 0;
|
|
4
4
|
const resolveGenericRnvConfig_1 = require("./resolveGenericRnvConfig");
|
|
5
5
|
const resolveBuildEnvName_1 = require("./resolveBuildEnvName");
|
|
6
6
|
const constants_1 = require("../constants");
|
|
@@ -34,3 +34,13 @@ const resolveBaseUrl = ({ platform, scheme, flavour }) => {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
exports.resolveBaseUrl = resolveBaseUrl;
|
|
37
|
+
const resolveProductionPackagesBaseUrl = (c) => {
|
|
38
|
+
const { hostedUrl } = c.buildConfig.common.deploy.productionPackages || {};
|
|
39
|
+
const baseUrl = hostedUrl?.baseUrl;
|
|
40
|
+
const subpath = hostedUrl?.subpath ?? '';
|
|
41
|
+
if (!baseUrl) {
|
|
42
|
+
throw new Error('The resolveProductionPackagesBaseUrl failed because baseUrl is missing.');
|
|
43
|
+
}
|
|
44
|
+
return `${baseUrl}${subpath}`;
|
|
45
|
+
};
|
|
46
|
+
exports.resolveProductionPackagesBaseUrl = resolveProductionPackagesBaseUrl;
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveBuildEnvName = void 0;
|
|
4
|
+
const resolveBuildEnvType_1 = require("./resolveBuildEnvType");
|
|
4
5
|
const constants_1 = require("../constants");
|
|
5
6
|
const resolveBuildEnvName = (scheme) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
case constants_1.
|
|
9
|
-
case constants_1.
|
|
10
|
-
case constants_1.
|
|
11
|
-
case constants_1.BuildSchemes.RELEASE_STAGING_DIST:
|
|
12
|
-
return 'staging';
|
|
13
|
-
case constants_1.BuildSchemes.RC_PROD:
|
|
14
|
-
case constants_1.BuildSchemes.RC_PROD_LATEST:
|
|
15
|
-
case constants_1.BuildSchemes.RELEASE_PROD:
|
|
16
|
-
case constants_1.BuildSchemes.RELEASE_PROD_LATEST:
|
|
17
|
-
case constants_1.BuildSchemes.RELEASE_PROD_DIST:
|
|
18
|
-
return 'production';
|
|
7
|
+
const envType = (0, resolveBuildEnvType_1.resolveBuildEnvType)(scheme);
|
|
8
|
+
switch (envType) {
|
|
9
|
+
case constants_1.BuildEnvironments.DEV: return 'development';
|
|
10
|
+
case constants_1.BuildEnvironments.STAGING: return 'staging';
|
|
11
|
+
case constants_1.BuildEnvironments.PROD: return 'production';
|
|
19
12
|
default:
|
|
20
|
-
|
|
13
|
+
throw new Error(`Unsupported environment type: ${envType}`);
|
|
21
14
|
}
|
|
22
15
|
};
|
|
23
16
|
exports.resolveBuildEnvName = resolveBuildEnvName;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveBuildEnvType = void 0;
|
|
4
|
+
const index_1 = require("../constants/index");
|
|
5
|
+
const resolveBuildEnvType = (scheme) => {
|
|
6
|
+
switch (scheme) {
|
|
7
|
+
case index_1.BuildSchemes.RC_STAGING:
|
|
8
|
+
case index_1.BuildSchemes.RC_STAGING_LATEST:
|
|
9
|
+
case index_1.BuildSchemes.RELEASE_STAGING:
|
|
10
|
+
case index_1.BuildSchemes.RELEASE_STAGING_LATEST:
|
|
11
|
+
case index_1.BuildSchemes.RELEASE_STAGING_DIST:
|
|
12
|
+
return 'staging';
|
|
13
|
+
case index_1.BuildSchemes.RC_PROD:
|
|
14
|
+
case index_1.BuildSchemes.RC_PROD_LATEST:
|
|
15
|
+
case index_1.BuildSchemes.RELEASE_PROD:
|
|
16
|
+
case index_1.BuildSchemes.RELEASE_PROD_LATEST:
|
|
17
|
+
case index_1.BuildSchemes.RELEASE_PROD_DIST:
|
|
18
|
+
return 'prod';
|
|
19
|
+
default:
|
|
20
|
+
return 'dev';
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.resolveBuildEnvType = resolveBuildEnvType;
|
|
@@ -5,8 +5,9 @@ const resolveBuildVersion_1 = require("./resolveBuildVersion");
|
|
|
5
5
|
const resolveBaseUrl_1 = require("./resolveBaseUrl");
|
|
6
6
|
const resolveHbbtvDeployUrl_1 = require("./resolveHbbtvDeployUrl");
|
|
7
7
|
const resolveBuildFileName_1 = require("./resolveBuildFileName");
|
|
8
|
-
const constants_1 = require("../constants");
|
|
9
8
|
const resolveSupportedPlatforms_1 = require("./resolveSupportedPlatforms");
|
|
9
|
+
const resolveSupportedFlavoursForPlatform_1 = require("./resolveSupportedFlavoursForPlatform");
|
|
10
|
+
const constants_1 = require("../constants");
|
|
10
11
|
const getBuildVersion = (c) => {
|
|
11
12
|
const { platform, runtime } = c;
|
|
12
13
|
const { scheme, appId } = runtime;
|
|
@@ -16,10 +17,6 @@ const getBuildVersion = (c) => {
|
|
|
16
17
|
flavour: appId,
|
|
17
18
|
});
|
|
18
19
|
};
|
|
19
|
-
const getSupportedFlavoursForPlatform = (c, platformName) => {
|
|
20
|
-
const { supportedFlavours = [] } = c.buildConfig.platforms[platformName]?.deploy || {};
|
|
21
|
-
return supportedFlavours;
|
|
22
|
-
};
|
|
23
20
|
const makeOutputObject = (buildVersion) => ({
|
|
24
21
|
versions: {
|
|
25
22
|
[buildVersion]: {
|
|
@@ -66,7 +63,7 @@ const resolveDeployLocations = (c) => {
|
|
|
66
63
|
}
|
|
67
64
|
return outputFlavourData;
|
|
68
65
|
};
|
|
69
|
-
const outputPlatformData =
|
|
66
|
+
const outputPlatformData = (0, resolveSupportedFlavoursForPlatform_1.resolveSupportedFlavoursForPlatform)(c, platformName)
|
|
70
67
|
.map(processPlatformFlavour);
|
|
71
68
|
outputPlatforms[platformName] = Object.assign({}, ...outputPlatformData);
|
|
72
69
|
if (!isRequiredPlatformSet) {
|
|
@@ -37,8 +37,15 @@ const mergeFileJsonIntoObject = (filePath, targetObject) => {
|
|
|
37
37
|
const fileContentAsJSON = JSON.parse(fileContentAsString);
|
|
38
38
|
(0, assign_deep_1.default)(targetObject, fileContentAsJSON);
|
|
39
39
|
};
|
|
40
|
-
const getBaseConfig = () => {
|
|
41
|
-
const
|
|
40
|
+
const getBaseConfig = (programOptions) => {
|
|
41
|
+
const { appConfigID, scheme } = programOptions || {};
|
|
42
|
+
const c = rnv_1.ConfigManager.createRnvConfig({ ci: true, ...programOptions }, process);
|
|
43
|
+
if (scheme) {
|
|
44
|
+
c.runtime.scheme = scheme;
|
|
45
|
+
}
|
|
46
|
+
if (appConfigID) {
|
|
47
|
+
c.runtime.appId = appConfigID;
|
|
48
|
+
}
|
|
42
49
|
c.buildConfig = {};
|
|
43
50
|
const packageJsonfileContent = fs.readFileSync('package.json').toString();
|
|
44
51
|
c.files.project.package = JSON.parse(packageJsonfileContent);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.getProductionZipFileRelativePath = void 0;
|
|
27
|
+
const path = __importStar(require("path"));
|
|
28
|
+
const getProductionZipFileRelativePath = (c) => {
|
|
29
|
+
const { appNameInFileName } = c.buildConfig.common;
|
|
30
|
+
const buildVersion = c.buildConfig.common.packageVersion;
|
|
31
|
+
const { platformBuildsDir } = c.buildConfig.paths;
|
|
32
|
+
const platformBuildsDirPath = path.join(platformBuildsDir);
|
|
33
|
+
const zipFileName = `${appNameInFileName}.production_packages_v${buildVersion}.zip`;
|
|
34
|
+
return path.join(platformBuildsDirPath, zipFileName);
|
|
35
|
+
};
|
|
36
|
+
exports.getProductionZipFileRelativePath = getProductionZipFileRelativePath;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveSupportedFlavoursForPlatform = void 0;
|
|
4
|
+
const resolveSupportedFlavoursForPlatform = (c, platformName) => {
|
|
5
|
+
const { supportedFlavours = [] } = c.buildConfig.platforms[platformName]?.deploy || {};
|
|
6
|
+
return supportedFlavours;
|
|
7
|
+
};
|
|
8
|
+
exports.resolveSupportedFlavoursForPlatform = resolveSupportedFlavoursForPlatform;
|
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.resolveZippedPlatformBuildsRelativeFilePath = void 0;
|
|
27
|
+
const path = __importStar(require("path"));
|
|
4
28
|
const resolveZippedPlatformBuildsRelativeFilePath = (c, platformName) => {
|
|
5
29
|
const { platformBuildsDir } = c.buildConfig.paths;
|
|
6
30
|
const { appNameInFileName } = c.buildConfig.common;
|
|
7
31
|
const buildVersion = c.buildConfig.common.packageVersion;
|
|
8
32
|
const zippedFilesParentDir = 'zipped_by_platform';
|
|
9
33
|
const fileExtension = 'zip';
|
|
10
|
-
const relativePathToDir =
|
|
34
|
+
const relativePathToDir = path.join(platformBuildsDir, zippedFilesParentDir);
|
|
11
35
|
const zipFileName = `${appNameInFileName}_${platformName}_${buildVersion}.${fileExtension}`;
|
|
12
36
|
return `${relativePathToDir}/${zipFileName}`;
|
|
13
37
|
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const child_process_1 = require("child_process");
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
const path = __importStar(require("path"));
|
|
29
|
+
const fse = __importStar(require("fs-extra"));
|
|
30
|
+
const getSafeSchemeString_1 = require("../utils/getSafeSchemeString");
|
|
31
|
+
const resolvers_1 = require("../resolvers");
|
|
32
|
+
const getProgressMessage = ({ schemes, schemeIndex, platforms, platformIndex, flavours, flavourIndex, }) => {
|
|
33
|
+
let string = `\nProcessing`;
|
|
34
|
+
string += ` "${platforms[platformIndex]}" platform`;
|
|
35
|
+
string += ` (${platformIndex + 1}/${platforms.length})`;
|
|
36
|
+
string += ` with "${schemes[schemeIndex]}" scheme"`;
|
|
37
|
+
string += ` (${schemeIndex + 1}/${schemes.length}),`;
|
|
38
|
+
string += ` and its "${flavours[flavourIndex]}" flavour`;
|
|
39
|
+
string += ` (${flavourIndex + 1}/${flavours.length})...`;
|
|
40
|
+
return string;
|
|
41
|
+
};
|
|
42
|
+
const buildTask = (options, c) => {
|
|
43
|
+
const { scheme, platform, flavour } = options;
|
|
44
|
+
const { platformBuildsDir } = c.buildConfig.paths;
|
|
45
|
+
const buildDirName = `${flavour}_${platform}`;
|
|
46
|
+
const publicBuildDirName = `${flavour}_${platform}-public`;
|
|
47
|
+
const buildDirPath = path.join(platformBuildsDir, buildDirName);
|
|
48
|
+
const publicBuildDirPath = path.join(platformBuildsDir, publicBuildDirName);
|
|
49
|
+
;
|
|
50
|
+
fs.rmSync(buildDirPath, { recursive: true, force: true });
|
|
51
|
+
fs.rmSync(publicBuildDirPath, { recursive: true, force: true });
|
|
52
|
+
const cmd = `npx rnv build -s ${scheme} -p ${platform} -c ${flavour} --ci`;
|
|
53
|
+
(0, child_process_1.execSync)(cmd, { stdio: 'inherit' });
|
|
54
|
+
const safeSchemeString = (0, getSafeSchemeString_1.getSafeSchemeString)(scheme);
|
|
55
|
+
const schemeBuildDir = path.join(platformBuildsDir, safeSchemeString, buildDirName);
|
|
56
|
+
const schemePublicBuildDir = path.join(platformBuildsDir, safeSchemeString, publicBuildDirName);
|
|
57
|
+
fse.copySync(buildDirPath, schemeBuildDir);
|
|
58
|
+
if (fs.existsSync(publicBuildDirPath)) {
|
|
59
|
+
fse.copySync(publicBuildDirPath, schemePublicBuildDir);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const buildAllWithSchemes = () => {
|
|
63
|
+
const schemes = process.argv.slice(2);
|
|
64
|
+
if (!schemes.length) {
|
|
65
|
+
throw new Error('No scheme name to use found! Please use rnv scheme names as a param.');
|
|
66
|
+
}
|
|
67
|
+
const c = (0, resolvers_1.getBaseConfig)();
|
|
68
|
+
const supportedPlatforms = (0, resolvers_1.resolveSupportedPlatforms)(c);
|
|
69
|
+
supportedPlatforms.forEach((platform, platformIndex, platforms) => {
|
|
70
|
+
schemes.forEach((scheme, schemeIndex, schemes) => {
|
|
71
|
+
c.runtime.scheme = scheme;
|
|
72
|
+
const supportedFlavours = (0, resolvers_1.resolveSupportedFlavoursForPlatform)(c, platform);
|
|
73
|
+
supportedFlavours.forEach((flavour, flavourIndex, flavours) => {
|
|
74
|
+
const msg = getProgressMessage({
|
|
75
|
+
platforms, platformIndex, schemes, schemeIndex, flavours, flavourIndex,
|
|
76
|
+
});
|
|
77
|
+
console.log(msg);
|
|
78
|
+
buildTask({ scheme, platform, flavour }, c);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
return true;
|
|
83
|
+
};
|
|
84
|
+
const startTimestamp = Date.now();
|
|
85
|
+
buildAllWithSchemes();
|
|
86
|
+
const msPerSecond = 1000;
|
|
87
|
+
const scriptTotalTimeInSeconds = Math.ceil((Date.now() - startTimestamp) / msPerSecond);
|
|
88
|
+
console.log(`buildAllWithSchemes: done in ${scriptTotalTimeInSeconds} second(s)!`);
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const child_process_1 = require("child_process");
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
const path = __importStar(require("path"));
|
|
29
|
+
const fse = __importStar(require("fs-extra"));
|
|
30
|
+
const forEachSupportedPlatformFlavour_1 = require("../utils/forEachSupportedPlatformFlavour");
|
|
31
|
+
const constants_1 = require("../constants");
|
|
32
|
+
const buildProductionPackages_1 = require("../constants/buildProductionPackages");
|
|
33
|
+
const resolvers_1 = require("../resolvers");
|
|
34
|
+
const getZippedDirRelativePath = (c) => {
|
|
35
|
+
const { platformBuildsDir } = c.buildConfig.paths;
|
|
36
|
+
return path.join(platformBuildsDir, 'zipped_production_packages');
|
|
37
|
+
};
|
|
38
|
+
const buildProductionTask = (options, c) => {
|
|
39
|
+
const { scheme, platform, flavour } = options;
|
|
40
|
+
const { platformBuildsDir } = c.buildConfig.paths;
|
|
41
|
+
const buildDirName = `${flavour}_${platform}`;
|
|
42
|
+
const buildDirPath = path.join(platformBuildsDir, buildDirName);
|
|
43
|
+
const buildOutputDirPath = path.join(buildDirPath, 'output');
|
|
44
|
+
fs.rmSync(buildDirPath, { recursive: true, force: true });
|
|
45
|
+
const cmd = `npx rnv build -s ${scheme} -p ${platform} -c ${flavour} --ci --productionPackagesHostedUrl`;
|
|
46
|
+
(0, child_process_1.execSync)(cmd, { stdio: 'inherit' });
|
|
47
|
+
const zippedDir = path.join(getZippedDirRelativePath(c), platform);
|
|
48
|
+
fse.copySync(buildOutputDirPath, zippedDir);
|
|
49
|
+
};
|
|
50
|
+
const buildProductionPackagesAll = () => {
|
|
51
|
+
console.log('buildProductionPackagesAll');
|
|
52
|
+
const schemes = process.argv.slice(2);
|
|
53
|
+
if (!schemes.length) {
|
|
54
|
+
throw new Error('Missing scheme parameter');
|
|
55
|
+
}
|
|
56
|
+
if (schemes[0] !== constants_1.BuildSchemes.RELEASE_PROD_DIST) {
|
|
57
|
+
throw new Error(`Supported only "${constants_1.BuildSchemes.RELEASE_PROD_DIST}" scheme`);
|
|
58
|
+
}
|
|
59
|
+
const c = (0, resolvers_1.getBaseConfig)();
|
|
60
|
+
c.runtime.scheme = schemes[0];
|
|
61
|
+
const platforms = (0, resolvers_1.resolveSupportedPlatforms)(c);
|
|
62
|
+
const skipPlatforms = platforms.filter((platform) => (!buildProductionPackages_1.SUPPORTED_PACKAGE_PLATFORMS.includes(platform)));
|
|
63
|
+
(0, forEachSupportedPlatformFlavour_1.forEachSupportedPlatformFlavour)(c, (options) => buildProductionTask(options, c), { ignoredPlatforms: skipPlatforms });
|
|
64
|
+
const zippedDirPath = path.resolve(getZippedDirRelativePath(c));
|
|
65
|
+
const zipFilePath = path.resolve((0, resolvers_1.getProductionZipFileRelativePath)(c));
|
|
66
|
+
fs.rmSync(zipFilePath, { force: true });
|
|
67
|
+
(0, child_process_1.execSync)(`zip -r ${zipFilePath} *`, { cwd: `${zippedDirPath}` });
|
|
68
|
+
fs.rmSync(zippedDirPath, { recursive: true, force: true });
|
|
69
|
+
return true;
|
|
70
|
+
};
|
|
71
|
+
const startTimestamp = Date.now();
|
|
72
|
+
buildProductionPackagesAll();
|
|
73
|
+
const msPerSecond = 1000;
|
|
74
|
+
const scriptTotalTimeInSeconds = Math.ceil((Date.now() - startTimestamp) / msPerSecond);
|
|
75
|
+
console.log(`buildProductionPackagesAll: done in ${scriptTotalTimeInSeconds} second(s)!`);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const forEachSupportedPlatformFlavour_1 = require("../utils/forEachSupportedPlatformFlavour");
|
|
4
|
+
const resolvers_1 = require("../resolvers");
|
|
5
|
+
const delopyLivePlatforms_1 = require("../constants/delopyLivePlatforms");
|
|
6
|
+
const distToLiveS3_1 = require("../tasks/deploy/aswS3/distToLiveS3");
|
|
7
|
+
const buildSchemes_1 = require("../constants/buildSchemes");
|
|
8
|
+
const deployLiveAll = () => {
|
|
9
|
+
const version = process.argv[2];
|
|
10
|
+
if (!version) {
|
|
11
|
+
throw new Error('No version supplied! Please provide distribution version to publish live.');
|
|
12
|
+
}
|
|
13
|
+
const c = (0, resolvers_1.getBaseConfig)();
|
|
14
|
+
c.runtime.scheme = buildSchemes_1.BuildSchemes.RELEASE_PROD_DIST;
|
|
15
|
+
(0, forEachSupportedPlatformFlavour_1.forEachSupportedPlatformFlavour)(c, (o) => {
|
|
16
|
+
(0, distToLiveS3_1.checkDistVersionAvailability)(o, version);
|
|
17
|
+
}, { ignoredPlatforms: delopyLivePlatforms_1.UNSUPPORTED_PLATFORMS });
|
|
18
|
+
(0, forEachSupportedPlatformFlavour_1.forEachSupportedPlatformFlavour)(c, (o) => {
|
|
19
|
+
(0, distToLiveS3_1.distToLiveS3)(o, version, delopyLivePlatforms_1.NO_CONTENT_FOLDER_PLATFORMS.includes(o.platform));
|
|
20
|
+
}, { ignoredPlatforms: delopyLivePlatforms_1.UNSUPPORTED_PLATFORMS });
|
|
21
|
+
return true;
|
|
22
|
+
};
|
|
23
|
+
const startTimestamp = Date.now();
|
|
24
|
+
deployLiveAll();
|
|
25
|
+
const msPerSecond = 1000;
|
|
26
|
+
const scriptTotalTimeInSeconds = Math.ceil((Date.now() - startTimestamp) / msPerSecond);
|
|
27
|
+
console.log(`deployLiveAll: done in ${scriptTotalTimeInSeconds} second(s)!`);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const forEachSupportedPlatformFlavour_1 = require("../utils/forEachSupportedPlatformFlavour");
|
|
4
|
+
const resolvers_1 = require("../resolvers");
|
|
5
|
+
const delopyLivePlatforms_1 = require("../constants/delopyLivePlatforms");
|
|
6
|
+
const distToLiveS3_1 = require("../tasks/deploy/aswS3/distToLiveS3");
|
|
7
|
+
const buildSchemes_1 = require("../constants/buildSchemes");
|
|
8
|
+
const deployLivePlatform = () => {
|
|
9
|
+
const version = process.argv[2];
|
|
10
|
+
const platform = process.argv[3];
|
|
11
|
+
if (!version) {
|
|
12
|
+
throw new Error('No version supplied! Please provide distribution version to publish live.');
|
|
13
|
+
}
|
|
14
|
+
if (!platform) {
|
|
15
|
+
throw new Error('No platform name to use found! Please use rnv platform name as a param.');
|
|
16
|
+
}
|
|
17
|
+
if (delopyLivePlatforms_1.UNSUPPORTED_PLATFORMS.includes(platform)) {
|
|
18
|
+
throw new Error(`Platform "${platform}" not supported!`);
|
|
19
|
+
}
|
|
20
|
+
const c = (0, resolvers_1.getBaseConfig)();
|
|
21
|
+
c.platform = platform;
|
|
22
|
+
c.runtime.scheme = buildSchemes_1.BuildSchemes.RELEASE_PROD_DIST;
|
|
23
|
+
const { scheme } = c.runtime;
|
|
24
|
+
const supportedFlavours = (0, resolvers_1.resolveSupportedFlavoursForPlatform)(c, platform);
|
|
25
|
+
const o = { scheme, platform };
|
|
26
|
+
supportedFlavours.forEach((flavour, flavourIndex) => {
|
|
27
|
+
console.log((0, forEachSupportedPlatformFlavour_1.getProgressMessage)({
|
|
28
|
+
platforms: [platform], platformIndex: 0, flavours: supportedFlavours, flavourIndex,
|
|
29
|
+
}));
|
|
30
|
+
(0, distToLiveS3_1.checkDistVersionAvailability)({ ...o, flavour }, version);
|
|
31
|
+
});
|
|
32
|
+
supportedFlavours.forEach((flavour, flavourIndex) => {
|
|
33
|
+
console.log((0, forEachSupportedPlatformFlavour_1.getProgressMessage)({
|
|
34
|
+
platforms: [platform], platformIndex: 0, flavours: supportedFlavours, flavourIndex,
|
|
35
|
+
}));
|
|
36
|
+
(0, distToLiveS3_1.distToLiveS3)({ ...o, flavour }, version, delopyLivePlatforms_1.NO_CONTENT_FOLDER_PLATFORMS.includes(o.platform));
|
|
37
|
+
});
|
|
38
|
+
return true;
|
|
39
|
+
};
|
|
40
|
+
const startTimestamp = Date.now();
|
|
41
|
+
deployLivePlatform();
|
|
42
|
+
const msPerSecond = 1000;
|
|
43
|
+
const scriptTotalTimeInSeconds = Math.ceil((Date.now() - startTimestamp) / msPerSecond);
|
|
44
|
+
console.log(`deployLivePlatform: done in ${scriptTotalTimeInSeconds} second(s)!`);
|
|
@@ -18,7 +18,7 @@ const makePlatformRowData = (rnvC, deployLocations, tableFlavours, platform) =>
|
|
|
18
18
|
const versionRegex = /\d{1,4}\.\d{1,4}\.\d{1,4}/g;
|
|
19
19
|
const versionPlaceholder = '<VERSION>';
|
|
20
20
|
packageUrl = packageUrl.replace(versionRegex, versionPlaceholder);
|
|
21
|
-
indexUrl =
|
|
21
|
+
indexUrl = indexUrl.replace(versionRegex, versionPlaceholder);
|
|
22
22
|
}
|
|
23
23
|
const tableCellContent = `[package](${packageUrl}) / [index.html](${indexUrl})`;
|
|
24
24
|
data.push(tableCellContent);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appCenterRelease = void 0;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
const appCenterRelease = (params) => {
|
|
6
|
+
const { filePath, releaseNotesPath, buildVersion, token, projectName } = params;
|
|
7
|
+
const app = `24i-Media/${projectName}`;
|
|
8
|
+
(0, child_process_1.execSync)('appcenter distribute release '
|
|
9
|
+
+ `--file "${filePath}" `
|
|
10
|
+
+ `--release-notes-file "${releaseNotesPath}" `
|
|
11
|
+
+ `--build-version "${buildVersion}" `
|
|
12
|
+
+ `--app "${app}" `
|
|
13
|
+
+ `--token "${token}" `
|
|
14
|
+
+ '--group "Collaborators" '
|
|
15
|
+
+ '--disable-telemetry', { stdio: 'inherit' });
|
|
16
|
+
};
|
|
17
|
+
exports.appCenterRelease = appCenterRelease;
|