@24i/smartapps-bigscreen-rnv-build-engine 0.17.1 → 0.17.2-7.alpha-2789
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 +45 -34
- package/dist/src/__tests__/resolvers/resolveBaseUrl.spec.js +33 -12
- package/dist/src/__tests__/resolvers/resolveBuildEnvName.spec.js +23 -0
- package/dist/src/__tests__/resolvers/resolveBuildEnvType.spec.js +23 -0
- package/dist/src/__tests__/resolvers/resolveBuildFileBaseName.spec.js +100 -0
- package/dist/src/__tests__/resolvers/resolveBuildFileName.spec.js +40 -20
- package/dist/src/__tests__/resolvers/resolveBuildVersion.spec.js +20 -10
- package/dist/src/__tests__/resolvers/resolveDeployLocations.spec.js +11 -11
- package/dist/src/__tests__/resolvers/resolveHbbtvDeployUrl.spec.js +21 -9
- package/dist/src/__tests__/resolvers/resolveHbbtvRemoteBuildDirRelativePath.spec.js +29 -10
- package/dist/src/constants/buildEnvironments.js +9 -0
- package/dist/src/constants/buildProductionPackages.js +10 -0
- package/dist/src/constants/buildSchemes.js +10 -5
- package/dist/src/constants/delopyLivePlatforms.js +14 -0
- package/dist/src/constants/index.js +3 -1
- package/dist/src/constants/platforms.js +2 -0
- package/dist/src/engine.js +10 -0
- package/dist/src/resolvers/index.js +14 -1
- package/dist/src/resolvers/resolveBaseUrl.js +16 -20
- package/dist/src/resolvers/resolveBuildEnvName.js +16 -0
- package/dist/src/resolvers/resolveBuildEnvType.js +23 -0
- package/dist/src/resolvers/resolveBuildFileBaseName.js +46 -0
- package/dist/src/resolvers/resolveBuildFileName.js +3 -27
- package/dist/src/resolvers/resolveBuildVersion.js +10 -5
- package/dist/src/resolvers/resolveBuildVersionOffset.js +1 -1
- package/dist/src/resolvers/resolveDeployLocations.js +3 -6
- package/dist/src/resolvers/resolveGenericRnvConfig.js +9 -2
- package/dist/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.js +11 -6
- package/dist/src/resolvers/resolvePackageVersions.js +2 -4
- package/dist/src/resolvers/resolveProductionZipFileRelativePath.js +35 -0
- package/dist/src/resolvers/resolveS3BucketAppPath.js +15 -0
- package/dist/src/resolvers/resolveSupportedFlavoursForPlatform.js +8 -0
- package/dist/src/resolvers/resolveZippedDirRelativePath.js +32 -0
- package/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +25 -1
- package/dist/src/resolvers/shared/constructFullUrl.js +25 -0
- package/dist/src/scripts/buildAllWithScheme.js +1 -1
- package/dist/src/scripts/buildAllWithSchemes.js +100 -0
- package/dist/src/scripts/buildProductionPackagesAll.js +77 -0
- package/dist/src/scripts/deployLiveAll.js +27 -0
- package/dist/src/scripts/deployLivePlatform.js +44 -0
- package/dist/src/scripts/generateDeployUrls/generateDeployUrls.js +90 -33
- package/dist/src/scripts/generateDeployUrls/makeTableDataByScheme.js +4 -2
- package/dist/src/scripts/purgeCloudfrontCache.js +71 -0
- package/dist/src/scripts/release/githubRelease.js +2 -2
- package/dist/src/scripts/release/notifySlack/makePayload.js +12 -8
- package/dist/src/scripts/release/notifySlack/notifySlack.js +20 -12
- package/dist/src/scripts/release/productionPackages/deployProductionPackages.js +52 -0
- package/dist/src/scripts/release/productionPackages/notifySlack.js +29 -0
- package/dist/src/scripts/release/sentryRelease.js +11 -5
- package/dist/src/scripts/release/urlsMarkdown.js +2 -0
- package/dist/src/scripts/releaseAllWithScheme.js +22 -13
- package/dist/src/scripts/releaseAllWithSchemes.js +154 -0
- package/dist/src/scripts/releaseProductionPackagesAll.js +46 -0
- package/dist/src/scripts/smokeTest/notifySlack.js +45 -0
- package/dist/src/scripts/smokeTest/smokeTestUtils.js +104 -0
- package/dist/src/scripts/smokeTest.js +67 -0
- package/dist/src/scripts/utils/getArgs.js +22 -0
- package/dist/src/sdks/index.js +6 -1
- package/dist/src/sdks/sdk-androidtv/index.js +17 -0
- package/dist/src/sdks/sdk-androidtv/sdkAndroidtv.js +301 -0
- package/dist/src/sdks/sdk-tizen/sdkTizen.js +22 -6
- package/dist/src/sdks/sdk-utils/sdk-installer/services/unzip.js +3 -2
- package/dist/src/sdks/sdk-webos/sdkWebos.js +3 -0
- package/dist/src/sdks/sdk-webpack/sdkWebpack.js +26 -3
- package/dist/src/tasks/deploy/aswS3/aws.js +23 -5
- package/dist/src/tasks/deploy/aswS3/deployS3.js +14 -13
- 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 +29 -8
- package/dist/src/tasks/task.rnv.configure.js +5 -1
- package/dist/src/tasks/task.rnv.deploy.js +12 -1
- package/dist/src/tasks/task.rnv.platform.configure.js +43 -1
- package/dist/src/tasks/task.rnv.start.js +2 -0
- 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 +9 -6
- package/dist/src/utils/zipStagingProdBuildsByPlatforms.js +114 -0
- package/dist/templates/platforms/_shared/template.js +3 -3
- package/dist/templates/platforms/_shared/webpack.base.js +6 -3
- package/dist/templates/platforms/androidtv/project/README.md +196 -0
- package/dist/templates/platforms/androidtv/project/amazoniap/build.gradle +40 -0
- package/dist/templates/platforms/androidtv/project/amazoniap/consumer-rules.pro +0 -0
- package/dist/templates/platforms/androidtv/project/amazoniap/proguard-rules.pro +21 -0
- package/dist/templates/platforms/androidtv/project/amazoniap/src/main/kotlin/com/twentyfouri/bridgetv/amazoniap/AmazonIapService.kt +90 -0
- package/dist/templates/platforms/androidtv/project/amazoniap/src/main/kotlin/com/twentyfouri/bridgetv/amazoniap/AmazonIapServiceFactory.kt +13 -0
- package/dist/templates/platforms/androidtv/project/app/build.gradle +132 -0
- package/dist/templates/platforms/androidtv/project/app/proguard-rules.pro +47 -0
- package/dist/templates/platforms/androidtv/project/app/src/bigscreenAppstage/java/com/twentyfouri/tvbridge/Flavor.kt +5 -0
- package/dist/templates/platforms/androidtv/project/app/src/bigscreenAppstage/res/raw/configuration.json +8 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/AndroidManifest.xml +52 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/FlavorBase.kt +12 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/bridge/BridgeFromJavaScript.kt +404 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/bridge/BridgeToJavaScript.kt +120 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/configuration/BridgeConfig.kt +18 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/configuration/ConfigCallback.kt +6 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/configuration/ConfigProvider.kt +27 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/configuration/Drm.kt +10 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/configuration/UserAgent.kt +6 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/BaseApplication.kt +73 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/di/ActivityComponent.kt +13 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/di/ActivityModule.kt +14 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/di/ApplicationComponent.kt +26 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/di/ApplicationModule.kt +51 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/di/PerActivity.kt +26 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/LocalStorage.kt +30 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/LoggingDrmCallback.kt +38 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/OverriddenHttpMediaDrmCallback.kt +134 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryBitmovinCustomized.kt +7 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryConfigured.kt +36 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryExoPlayerCustomized.kt +101 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryExoPlayerNpaw.kt +581 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryVersion.kt +27 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/SimpleActivityLifecycleCallback.kt +32 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/SourceDrmOverridden.kt +91 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/sound/TouchPlayer.kt +86 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/client/BridgeWebView.kt +82 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/client/BridgeWebViewClient.kt +114 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/model/AnalyticsPlaybackInfo.kt +10 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/model/ContentModel.kt +14 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/model/DrmModel.kt +20 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/model/MediaEventType.kt +30 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/parser/PlaybackInfoParser.kt +10 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/parser/SourceParser.kt +89 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/parser/TrackJsonModelParser.kt +58 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/view/Mainview.kt +17 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/view/PlayerCache.kt +15 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/view/WebViewActivity.kt +259 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/viewmodel/WebViewModel.kt +695 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/res/drawable/button_background_focus.xml +10 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/res/drawable/button_background_normal.xml +7 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/res/drawable/button_background_pressed.xml +7 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/res/drawable/button_focus.xml +8 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/res/layout/activity_web_view.xml +28 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/res/raw/click.ogg +0 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/res/values/styles.xml +12 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/res/xml/network_security_config.xml +4 -0
- package/dist/templates/platforms/androidtv/project/build.gradle +45 -0
- package/dist/templates/platforms/androidtv/project/common/build.gradle +40 -0
- package/dist/templates/platforms/androidtv/project/common/consumer-rules.pro +0 -0
- package/dist/templates/platforms/androidtv/project/common/proguard-rules.pro +21 -0
- package/dist/templates/platforms/androidtv/project/common/src/main/java/com/twentyfouri/tvbridge/common/IapService.kt +114 -0
- package/dist/templates/platforms/androidtv/project/googleiap/build.gradle +40 -0
- package/dist/templates/platforms/androidtv/project/googleiap/consumer-rules.pro +0 -0
- package/dist/templates/platforms/androidtv/project/googleiap/proguard-rules.pro +21 -0
- package/dist/templates/platforms/androidtv/project/googleiap/src/main/java/com/twentyfouri/tvbridge/googleiap/GoogleIapService.kt +29 -0
- package/dist/templates/platforms/androidtv/project/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/dist/templates/platforms/androidtv/project/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/dist/templates/platforms/androidtv/project/gradle.properties +4 -0
- package/dist/templates/platforms/androidtv/project/gradlew +251 -0
- package/dist/templates/platforms/androidtv/project/gradlew.bat +94 -0
- package/dist/templates/platforms/androidtv/project/proguard-rules.pro +42 -0
- package/dist/templates/platforms/androidtv/project/settings.gradle +4 -0
- package/dist/templates/platforms/tizen/project/config.xml +2 -0
- package/jest.config.js +2 -2
- package/package.json +9 -6
- package/renative.engine.json +2 -0
- package/dist/src/scripts/release/deployToAppCenter.js +0 -87
- /package/dist/src/scripts/{release/notifySlack → utils}/slackBlockKitBuilder.js +0 -0
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ which is used instead of core ReNative engine to fulfill the needs of SmartApps
|
|
|
30
30
|
it
|
|
31
31
|
- **builds** applications for requested platforms
|
|
32
32
|
- **deploys** the built applications to `AWS S3` (or to server configured to host `HbbTV` applications)
|
|
33
|
-
- **releases** new versions to `
|
|
33
|
+
- **releases** new versions to `GitHub`
|
|
34
34
|
- sends **Slack notifications** for `release candidate` and `release` builds
|
|
35
35
|
- supports `Sentry.io` runtime **error logging**
|
|
36
36
|
|
|
@@ -38,18 +38,20 @@ it
|
|
|
38
38
|
---
|
|
39
39
|
## Supported platforms
|
|
40
40
|
|
|
41
|
-
| *Platform* | *Vendor* | *id* | *Build file extension* | *Registered file extensions*
|
|
42
|
-
| :------------ |
|
|
43
|
-
| **AndroidTV** | N/A | `androidtv` | `.zip` | `*.android.tv.{js,jsx,ts,tsx,json}`
|
|
44
|
-
| **Entone** | Amino | `entone` | `.zip` | `*.entone.{js,jsx,ts,tsx,json}`
|
|
45
|
-
| **
|
|
46
|
-
| **
|
|
47
|
-
| **
|
|
48
|
-
| **
|
|
49
|
-
| **
|
|
50
|
-
| **
|
|
51
|
-
| **
|
|
52
|
-
| **
|
|
41
|
+
| *Platform* | *Vendor* | *id* | *Build file extension* | *Registered file extensions* | *Note* |
|
|
42
|
+
| :------------ | :-------: | :---------: | :--------------------: | :----------------------------------: | :------------------------------: |
|
|
43
|
+
| **AndroidTV** | N/A | `androidtv` | `.zip` | `*.android.tv.{js,jsx,ts,tsx,json}` | |
|
|
44
|
+
| **Entone** | Amino | `entone` | `.zip` | `*.entone.{js,jsx,ts,tsx,json}` | set-top boxes |
|
|
45
|
+
| **FireTV** | N/A | `firetv` | `.zip` | `*.firetv.{js,jsx,ts,tsx,json}` | |
|
|
46
|
+
| **HbbTV** | N/A | `hbbtv` | `.zip` | `*.hbbtv.tv.{js,jsx,ts,tsx,json}` | |
|
|
47
|
+
| **KreaTV** | Arris | `kreatv` | `.zip` | `*.kreatv.{js,jsx,ts,tsx,json}` | set-top boxes |
|
|
48
|
+
| **Saphi** | Philips | `saphi` | `.zip` | `*.saphi.tv.{js,jsx,ts,tsx,json}` | |
|
|
49
|
+
| **Tizen** | Samsung | `tizen` | `.wgt` | `*.tizen.tv.{js,jsx,ts,tsx,json}` | |
|
|
50
|
+
| **VIDAA** | Hisense | `vidaa` | `.zip` | `*.vidaa.tv.{js,jsx,ts,tsx,json}` | |
|
|
51
|
+
| **SmartCast** | VIZIO | `smartcast` | `.zip` | `*.smartcast.tv.{js,jsx,ts,tsx,json}`| |
|
|
52
|
+
| **webOS** | LG | `webos` | `.ipk` | `*.webos.tv.{js,jsx,ts,tsx,json}` | |
|
|
53
|
+
| **WebTV** | N/A | `webtv` | `.zip` | `*.webtv.{js,jsx,ts,tsx,json}` | for previewing builds in browser |
|
|
54
|
+
| **Xbox** | Microsoft | `xbox` | `.zip` | `*.xbox.{js,jsx,ts,tsx,json}` | |
|
|
53
55
|
|
|
54
56
|
When building the application with ReNative, if file with ***registered platform extension*** is found,
|
|
55
57
|
it takes precedence and is bundled instead of file without registered file extension (such as `index.ts`).
|
|
@@ -60,11 +62,13 @@ drivers/
|
|
|
60
62
|
index.ts // fallback when file with platform file extension for selected platform is not found
|
|
61
63
|
index.android.tv.ts // if build for AndroidTV platform is selected, this file will be picked for the build
|
|
62
64
|
index.entone.ts
|
|
65
|
+
index.firetv.ts
|
|
63
66
|
index.hbbtv.tv.ts
|
|
64
67
|
index.kreatv.ts
|
|
65
68
|
index.saphi.tv.ts
|
|
66
69
|
index.tizen.tv.ts
|
|
67
70
|
index.vidaa.tv.ts
|
|
71
|
+
index.smartcast.tv.ts
|
|
68
72
|
index.webos.tv.ts
|
|
69
73
|
index.webtv.ts
|
|
70
74
|
index.xbox.ts
|
|
@@ -72,16 +76,21 @@ drivers/
|
|
|
72
76
|
---
|
|
73
77
|
## Supported build schemes
|
|
74
78
|
|
|
75
|
-
| *Scheme id*
|
|
76
|
-
|
|
|
77
|
-
| **debug**
|
|
78
|
-
| **dev**
|
|
79
|
-
| **dev:latest**
|
|
80
|
-
| **rc** |
|
|
81
|
-
| **rc:
|
|
82
|
-
| **
|
|
83
|
-
| **
|
|
84
|
-
| **release:
|
|
79
|
+
| *Scheme id* | *Environment* | *Usage* |
|
|
80
|
+
| :------------------------- | :-----------------: | ------------------------------------------------------------- |
|
|
81
|
+
| **debug** | development | Local builds for debugging purposes |
|
|
82
|
+
| **dev** | development | |
|
|
83
|
+
| **dev:latest** | development | By CI on merge any pull request into `development` branch |
|
|
84
|
+
| **rc:staging** | staging | |
|
|
85
|
+
| **rc:prod** | production | |
|
|
86
|
+
| **rc:staging:latest** | staging | By CI on merge any pull request into `rc/v?.?.?` branch |
|
|
87
|
+
| **rc:prod:latest** | production | By CI on merge any pull request into `rc/v?.?.?` branch |
|
|
88
|
+
| **release:staging** | staging | |
|
|
89
|
+
| **release:prod** | production | |
|
|
90
|
+
| **release:staging:latest** | staging | By CI on merge any pull request into `master` branch |
|
|
91
|
+
| **release:prod:latest** | production | By CI on merge any pull request into `master` branch |
|
|
92
|
+
| **release:staging:dist** | staging | By CI on merge any pull request into `master` branch |
|
|
93
|
+
| **release:prod:dist** | production | By CI on merge pull request into `master` branch |
|
|
85
94
|
|
|
86
95
|
### Schemes with `:latest` postfix
|
|
87
96
|
Scheme names with `:latest` postfix **always deploys into the same location**.
|
|
@@ -90,19 +99,21 @@ In other words, app url is the same for each deployed build.
|
|
|
90
99
|
An example:
|
|
91
100
|
```
|
|
92
101
|
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/latest/dev/...
|
|
93
|
-
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/latest/rc
|
|
94
|
-
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/latest/release
|
|
102
|
+
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/latest/rc/<ENVIRONMENT>/...
|
|
103
|
+
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/latest/release/<ENVIRONMENT>/...
|
|
95
104
|
```
|
|
96
105
|
|
|
97
|
-
### `release:dist` scheme
|
|
98
|
-
The difference from
|
|
106
|
+
### `release:[staging/prod]:dist` scheme
|
|
107
|
+
The difference from schemes with [`:latest` postfix](#schemes-with-latest-postfix)
|
|
99
108
|
is that new builds are not deployed to the same remote folder all the time.
|
|
100
109
|
Instead, a new folder is created for each new app version.
|
|
101
110
|
|
|
102
111
|
An example:
|
|
103
112
|
```
|
|
104
|
-
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/dist/v0.0.1/...
|
|
105
|
-
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/dist/v0.0.
|
|
113
|
+
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/dist/v0.0.1/staging/...
|
|
114
|
+
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/dist/v0.0.1/production/...
|
|
115
|
+
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/dist/v0.0.2/staging/...
|
|
116
|
+
http://smartapps-bigscreen.<PROJECT_NAME>.24imedia.com.s3.amazonaws.com/builds/<PLATFORM>/<FLAVOUR>/dist/v0.0.2/production/...
|
|
106
117
|
```
|
|
107
118
|
|
|
108
119
|
---
|
|
@@ -118,13 +129,13 @@ Currently, following variable names are configured for replacing:
|
|
|
118
129
|
| **WEBPACK_INJECTION_APP_TITLE** | string | app title (used in app ui) | `'Appstage'`, `'Pure Flix'` |
|
|
119
130
|
| **WEBPACK_INJECTION_APP_CONFIG_ID** | string | flavour id *(value of rnv CLI `-c` param value)* | `'animated_1080'`, `'basic_720'` |
|
|
120
131
|
| **WEBPACK_INJECTION_APP_CREATED** | string | build time in ISO 8601 format | `'2021-07-30T09:18:26.014Z'` |
|
|
121
|
-
| **WEBPACK_INJECTION_APP_SCHEME** | string | scheme used during the build | `'debug'`, `'rc:latest'
|
|
132
|
+
| **WEBPACK_INJECTION_APP_SCHEME** | string | scheme used during the build | `'debug'`, `'rc:prod:latest'` |
|
|
122
133
|
| **WEBPACK_INJECTION_APP_RESOLUTION** | string | app resolution in `<WIDTH>x<HEIGHT>` format (in pixels) | `'1920x1080'`, `'1280x720'` |
|
|
123
134
|
| **WEBPACK_INJECTION_APP_VERSION** | string | app version | `'v0.0.1.dev'`, `'v0.0.1.rc-1'`, `'v0.0.1'` |
|
|
124
135
|
| **WEBPACK_INJECTION_APP_ENVIRONMENT** | string | environment used during the build | `'development'`, `'production'` |
|
|
125
136
|
| **WEBPACK_INJECTION_APP_PLATFORM** | string | platform id *(value of rnv CLI `-p` param value)* | `'webtv'`, `'webos'`, `'tizen'`, `'entone'` |
|
|
126
137
|
| **WEBPACK_INJECTION_APP_CONTENT_PATH** | string | path to content directory | `'./public/content'` |
|
|
127
|
-
| **WEBPACK_INJECTION_APP_CORE_VERSIONS** | string | version of the core packages | `'SDK: 1.0.5'`, `'WL: 1.0.6-alpha.2146'`
|
|
138
|
+
| **WEBPACK_INJECTION_APP_CORE_VERSIONS** | string | version of the core packages | `'SDK: 1.0.5'`, `'WL: 1.0.6-alpha.2146'` |
|
|
128
139
|
|
|
129
140
|
An example:
|
|
130
141
|
```typescript
|
|
@@ -199,12 +210,12 @@ It allows us to extend the number of platforms we build for
|
|
|
199
210
|
|
|
200
211
|
Using the custom engine allows us to change the build steps defined in core ReNative engine.
|
|
201
212
|
Also, custom engine is prepared for deploying the built applications to `AWS S3` and to server specially configured for `HbbTV` builds.
|
|
202
|
-
Our custom build engine is also configured to deploy releases to `
|
|
213
|
+
Our custom build engine is also configured to deploy releases to `GitHub` and `Sentry`.
|
|
203
214
|
|
|
204
215
|
- added support for more platforms (see [supported platforms](#supported-platforms))
|
|
205
216
|
- overwritten rnv tasks (such us `build`, `deploy`)
|
|
206
217
|
- added automatic installation of `Tizen` and `webOS` SDKs before building the packages
|
|
207
|
-
- deploy to `AWS S3`, `
|
|
218
|
+
- deploy to `AWS S3`, `GitHub`, `Sentry`
|
|
208
219
|
- added support for `Slack` notifications for `release candidate` and `release` builds
|
|
209
220
|
|
|
210
221
|
Inside [src/tasks/](src/tasks) folder, there is a source code for **ReNative tasks** which overrides core ReNative tasks.
|
|
@@ -217,7 +228,7 @@ If any platform needs any **platform-specific files**, those can be found also i
|
|
|
217
228
|
## How to set up new project with SmartApps BIGscreen build engine
|
|
218
229
|
There are a few things that are not included in the package and need to be added manually.
|
|
219
230
|
For example `renative.json` config file and `appConfigs` folder (both related to ReNative)
|
|
220
|
-
and `.
|
|
231
|
+
and `.github/workflows/*.yml` files (related to GitHub Actions CI).
|
|
221
232
|
|
|
222
233
|
> To **start a new project** with usage of our build process,
|
|
223
234
|
> please use [SmartApps BIGscreen Template repository](https://github.com/24i/smartapps-bigscreen-template),
|
|
@@ -55,9 +55,12 @@ describe('resolveBaseUrl', () => {
|
|
|
55
55
|
it('returns empty string for other build schemes as latest or distribution', () => {
|
|
56
56
|
const schemesWithDefinedBaseUrl = [
|
|
57
57
|
constants_1.BuildSchemes.DEV_LATEST,
|
|
58
|
-
constants_1.BuildSchemes.
|
|
59
|
-
constants_1.BuildSchemes.
|
|
60
|
-
constants_1.BuildSchemes.
|
|
58
|
+
constants_1.BuildSchemes.RC_STAGING_LATEST,
|
|
59
|
+
constants_1.BuildSchemes.RC_PROD_LATEST,
|
|
60
|
+
constants_1.BuildSchemes.RELEASE_STAGING_LATEST,
|
|
61
|
+
constants_1.BuildSchemes.RELEASE_PROD_LATEST,
|
|
62
|
+
constants_1.BuildSchemes.RELEASE_STAGING_DIST,
|
|
63
|
+
constants_1.BuildSchemes.RELEASE_PROD_DIST,
|
|
61
64
|
];
|
|
62
65
|
Object.values(constants_1.Platforms).forEach((platform) => {
|
|
63
66
|
Object.values(constants_1.BuildSchemes).forEach((scheme) => {
|
|
@@ -77,22 +80,40 @@ describe('resolveBaseUrl', () => {
|
|
|
77
80
|
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/dev`);
|
|
78
81
|
});
|
|
79
82
|
});
|
|
80
|
-
it('returns proper url for "latest release candidate" scheme', () => {
|
|
81
|
-
const scheme = constants_1.BuildSchemes.
|
|
83
|
+
it('returns proper url for "latest release candidate (staging)" scheme', () => {
|
|
84
|
+
const scheme = constants_1.BuildSchemes.RC_STAGING_LATEST;
|
|
82
85
|
Object.values(constants_1.Platforms).forEach((platform) => {
|
|
83
|
-
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/rc`);
|
|
86
|
+
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/rc/staging`);
|
|
84
87
|
});
|
|
85
88
|
});
|
|
86
|
-
it('returns proper url for "latest release"
|
|
87
|
-
const scheme = constants_1.BuildSchemes.
|
|
89
|
+
it('returns proper url for "latest release candidate (production)" scheme', () => {
|
|
90
|
+
const scheme = constants_1.BuildSchemes.RC_PROD_LATEST;
|
|
88
91
|
Object.values(constants_1.Platforms).forEach((platform) => {
|
|
89
|
-
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/
|
|
92
|
+
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/rc/production`);
|
|
90
93
|
});
|
|
91
94
|
});
|
|
92
|
-
it('returns proper url for "
|
|
93
|
-
const scheme = constants_1.BuildSchemes.
|
|
95
|
+
it('returns proper url for "latest release (staging)" build scheme', () => {
|
|
96
|
+
const scheme = constants_1.BuildSchemes.RELEASE_STAGING_LATEST;
|
|
94
97
|
Object.values(constants_1.Platforms).forEach((platform) => {
|
|
95
|
-
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/
|
|
98
|
+
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/release/staging`);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
it('returns proper url for "latest release (production)" build scheme', () => {
|
|
102
|
+
const scheme = constants_1.BuildSchemes.RELEASE_PROD_LATEST;
|
|
103
|
+
Object.values(constants_1.Platforms).forEach((platform) => {
|
|
104
|
+
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/release/production`);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
it('returns proper url for "distribution release (staging)" build scheme', () => {
|
|
108
|
+
const scheme = constants_1.BuildSchemes.RELEASE_STAGING_DIST;
|
|
109
|
+
Object.values(constants_1.Platforms).forEach((platform) => {
|
|
110
|
+
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/dist/v${packageVersion}/staging`);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
it('returns proper url for "distribution release (production)" build scheme', () => {
|
|
114
|
+
const scheme = constants_1.BuildSchemes.RELEASE_PROD_DIST;
|
|
115
|
+
Object.values(constants_1.Platforms).forEach((platform) => {
|
|
116
|
+
expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/dist/v${packageVersion}/production`);
|
|
96
117
|
});
|
|
97
118
|
});
|
|
98
119
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const buildSchemes_1 = require("../../constants/buildSchemes");
|
|
4
|
+
const resolveBuildEnvName_1 = require("../../resolvers/resolveBuildEnvName");
|
|
5
|
+
describe('resolveBuildEnvName', () => {
|
|
6
|
+
it.each([
|
|
7
|
+
[buildSchemes_1.BuildSchemes.DEBUG, 'development'],
|
|
8
|
+
[buildSchemes_1.BuildSchemes.DEV, 'development'],
|
|
9
|
+
[buildSchemes_1.BuildSchemes.DEV_LATEST, 'development'],
|
|
10
|
+
[buildSchemes_1.BuildSchemes.RC_STAGING, 'staging'],
|
|
11
|
+
[buildSchemes_1.BuildSchemes.RC_PROD, 'production'],
|
|
12
|
+
[buildSchemes_1.BuildSchemes.RC_STAGING_LATEST, 'staging'],
|
|
13
|
+
[buildSchemes_1.BuildSchemes.RC_PROD_LATEST, 'production'],
|
|
14
|
+
[buildSchemes_1.BuildSchemes.RELEASE_STAGING, 'staging'],
|
|
15
|
+
[buildSchemes_1.BuildSchemes.RELEASE_PROD, 'production'],
|
|
16
|
+
[buildSchemes_1.BuildSchemes.RELEASE_STAGING_LATEST, 'staging'],
|
|
17
|
+
[buildSchemes_1.BuildSchemes.RELEASE_PROD_LATEST, 'production'],
|
|
18
|
+
[buildSchemes_1.BuildSchemes.RELEASE_STAGING_DIST, 'staging'],
|
|
19
|
+
[buildSchemes_1.BuildSchemes.RELEASE_PROD_DIST, 'production'],
|
|
20
|
+
])('scheme "%s" has environment "%s"', (scheme, envName) => {
|
|
21
|
+
expect((0, resolveBuildEnvName_1.resolveBuildEnvName)(scheme)).toBe(envName);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -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,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const resolveBuildFileBaseName_1 = require("../../resolvers/resolveBuildFileBaseName");
|
|
4
|
+
const resolveGenericRnvConfig_1 = require("../../resolvers/resolveGenericRnvConfig");
|
|
5
|
+
const resolveBuildVersionOffset_1 = require("../../resolvers/resolveBuildVersionOffset");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
jest.mock('../../resolvers/resolveGenericRnvConfig');
|
|
8
|
+
jest.mock('../../resolvers/resolveBuildVersionOffset');
|
|
9
|
+
describe('resolveBuildFileBaseName', () => {
|
|
10
|
+
let c = {};
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
resolveGenericRnvConfig_1.getBaseConfig.mockReturnValue({
|
|
13
|
+
runtime: {},
|
|
14
|
+
buildConfig: { common: { packageVersion: '1.0.0' } },
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
afterEach(() => {
|
|
18
|
+
jest.clearAllMocks();
|
|
19
|
+
jest.resetAllMocks();
|
|
20
|
+
jest.resetModules();
|
|
21
|
+
});
|
|
22
|
+
beforeEach(() => {
|
|
23
|
+
c = {
|
|
24
|
+
runtime: { appId: 'flavour' },
|
|
25
|
+
buildConfig: {
|
|
26
|
+
common: { appNameInFileName: 'appName' },
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
it('returns proper string when there is no version offset', () => {
|
|
31
|
+
resolveBuildVersionOffset_1.resolveBuildVersionOffset.mockReturnValue('');
|
|
32
|
+
Object.values(constants_1.Platforms).forEach((platform) => {
|
|
33
|
+
c.platform = platform;
|
|
34
|
+
c.runtime.scheme = constants_1.BuildSchemes.DEBUG;
|
|
35
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0.debug_flavour`);
|
|
36
|
+
c.runtime.scheme = constants_1.BuildSchemes.DEV;
|
|
37
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0.dev_flavour`);
|
|
38
|
+
c.runtime.scheme = constants_1.BuildSchemes.DEV_LATEST;
|
|
39
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.dev_flavour`);
|
|
40
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_STAGING;
|
|
41
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0.rc-staging_flavour`);
|
|
42
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_PROD;
|
|
43
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0.rc-production_flavour`);
|
|
44
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_STAGING_LATEST;
|
|
45
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.rc-staging_flavour`);
|
|
46
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_PROD_LATEST;
|
|
47
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.rc-production_flavour`);
|
|
48
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING;
|
|
49
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0-staging_flavour`);
|
|
50
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD;
|
|
51
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0-production_flavour`);
|
|
52
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING_LATEST;
|
|
53
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.release-staging_flavour`);
|
|
54
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD_LATEST;
|
|
55
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.release-production_flavour`);
|
|
56
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING_DIST;
|
|
57
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0-staging_flavour`);
|
|
58
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD_DIST;
|
|
59
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0-production_flavour`);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
it('returns proper string when there is version offset', () => {
|
|
63
|
+
resolveBuildVersionOffset_1.resolveBuildVersionOffset.mockReturnValue('1');
|
|
64
|
+
Object.values(constants_1.Platforms).forEach((platform) => {
|
|
65
|
+
c.platform = platform;
|
|
66
|
+
c.runtime.scheme = constants_1.BuildSchemes.DEBUG;
|
|
67
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0.debug-1_flavour`);
|
|
68
|
+
c.runtime.scheme = constants_1.BuildSchemes.DEV;
|
|
69
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0.dev-1_flavour`);
|
|
70
|
+
c.runtime.scheme = constants_1.BuildSchemes.DEV_LATEST;
|
|
71
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.dev_flavour`);
|
|
72
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_STAGING;
|
|
73
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0.rc-1-staging_flavour`);
|
|
74
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_PROD;
|
|
75
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0.rc-1-production_flavour`);
|
|
76
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_STAGING_LATEST;
|
|
77
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.rc-staging_flavour`);
|
|
78
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_PROD_LATEST;
|
|
79
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.rc-production_flavour`);
|
|
80
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING;
|
|
81
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0-1-staging_flavour`);
|
|
82
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD;
|
|
83
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0-1-production_flavour`);
|
|
84
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING_LATEST;
|
|
85
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.release-staging_flavour`);
|
|
86
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD_LATEST;
|
|
87
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_latest.release-production_flavour`);
|
|
88
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING_DIST;
|
|
89
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0-1-staging_flavour`);
|
|
90
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD_DIST;
|
|
91
|
+
expect((0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c)).toBe(`appName_${platform}_v1.0.0-1-production_flavour`);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
it('throws an error when c.buildConfig.common.appNameInFileName is not present', () => {
|
|
95
|
+
c.buildConfig.common.appNameInFileName = '';
|
|
96
|
+
expect(() => {
|
|
97
|
+
(0, resolveBuildFileBaseName_1.resolveBuildFileBaseName)(c);
|
|
98
|
+
}).toThrowError(new Error('Missing value for "c.buildConfig.common.appNameInFileName"!'));
|
|
99
|
+
});
|
|
100
|
+
});
|
|
@@ -45,16 +45,26 @@ describe('resolveBuildFileName', () => {
|
|
|
45
45
|
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0.dev_flavour.${ext}`);
|
|
46
46
|
c.runtime.scheme = constants_1.BuildSchemes.DEV_LATEST;
|
|
47
47
|
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.dev_flavour.${ext}`);
|
|
48
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
49
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0.
|
|
50
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
51
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}
|
|
52
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
53
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}
|
|
54
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
55
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.
|
|
56
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
57
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.
|
|
48
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_STAGING;
|
|
49
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0.rc-staging_flavour.${ext}`);
|
|
50
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_PROD;
|
|
51
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0.rc-production_flavour.${ext}`);
|
|
52
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_STAGING_LATEST;
|
|
53
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.rc-staging_flavour.${ext}`);
|
|
54
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_PROD_LATEST;
|
|
55
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.rc-production_flavour.${ext}`);
|
|
56
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING;
|
|
57
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0-staging_flavour.${ext}`);
|
|
58
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD;
|
|
59
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0-production_flavour.${ext}`);
|
|
60
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING_LATEST;
|
|
61
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.release-staging_flavour.${ext}`);
|
|
62
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD_LATEST;
|
|
63
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.release-production_flavour.${ext}`);
|
|
64
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING_DIST;
|
|
65
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0-staging_flavour.${ext}`);
|
|
66
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD_DIST;
|
|
67
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0-production_flavour.${ext}`);
|
|
58
68
|
});
|
|
59
69
|
});
|
|
60
70
|
it('returns proper string when there is version offset', () => {
|
|
@@ -68,16 +78,26 @@ describe('resolveBuildFileName', () => {
|
|
|
68
78
|
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0.dev-1_flavour.${ext}`);
|
|
69
79
|
c.runtime.scheme = constants_1.BuildSchemes.DEV_LATEST;
|
|
70
80
|
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.dev_flavour.${ext}`);
|
|
71
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
72
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0.rc-
|
|
73
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
74
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}
|
|
75
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
76
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}
|
|
77
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
78
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.
|
|
79
|
-
c.runtime.scheme = constants_1.BuildSchemes.
|
|
80
|
-
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0-
|
|
81
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_STAGING;
|
|
82
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0.rc-1-staging_flavour.${ext}`);
|
|
83
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_PROD;
|
|
84
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0.rc-1-production_flavour.${ext}`);
|
|
85
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_STAGING_LATEST;
|
|
86
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.rc-staging_flavour.${ext}`);
|
|
87
|
+
c.runtime.scheme = constants_1.BuildSchemes.RC_PROD_LATEST;
|
|
88
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.rc-production_flavour.${ext}`);
|
|
89
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING;
|
|
90
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0-1-staging_flavour.${ext}`);
|
|
91
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD;
|
|
92
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0-1-production_flavour.${ext}`);
|
|
93
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING_LATEST;
|
|
94
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.release-staging_flavour.${ext}`);
|
|
95
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD_LATEST;
|
|
96
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_latest.release-production_flavour.${ext}`);
|
|
97
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_STAGING_DIST;
|
|
98
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0-1-staging_flavour.${ext}`);
|
|
99
|
+
c.runtime.scheme = constants_1.BuildSchemes.RELEASE_PROD_DIST;
|
|
100
|
+
expect((0, resolveBuildFileName_1.resolveBuildFileName)(c)).toBe(`appName_${platform}_v1.0.0-1-production_flavour.${ext}`);
|
|
81
101
|
});
|
|
82
102
|
});
|
|
83
103
|
it('throws an error when c.buildConfig.common.appNameInFileName is not present', () => {
|
|
@@ -23,11 +23,16 @@ describe('resolveBuildVersion', () => {
|
|
|
23
23
|
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.DEBUG })).toBe('v1.0.0.debug');
|
|
24
24
|
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.DEV })).toBe('v1.0.0.dev');
|
|
25
25
|
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.DEV_LATEST })).toBe('v1.0.0.dev');
|
|
26
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
27
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
28
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
29
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
30
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
26
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RC_STAGING })).toBe('v1.0.0.rc');
|
|
27
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RC_PROD })).toBe('v1.0.0.rc');
|
|
28
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RC_STAGING_LATEST })).toBe('v1.0.0.rc');
|
|
29
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RC_PROD_LATEST })).toBe('v1.0.0.rc');
|
|
30
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_STAGING })).toBe('v1.0.0');
|
|
31
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_PROD })).toBe('v1.0.0');
|
|
32
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_STAGING_LATEST })).toBe('v1.0.0');
|
|
33
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_PROD_LATEST })).toBe('v1.0.0');
|
|
34
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_STAGING_DIST })).toBe('v1.0.0');
|
|
35
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_PROD_DIST })).toBe('v1.0.0');
|
|
31
36
|
});
|
|
32
37
|
});
|
|
33
38
|
it('returns proper string when there is version offset', () => {
|
|
@@ -40,11 +45,16 @@ describe('resolveBuildVersion', () => {
|
|
|
40
45
|
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.DEBUG })).toBe('v1.0.0.debug-2');
|
|
41
46
|
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.DEV })).toBe('v1.0.0.dev-2');
|
|
42
47
|
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.DEV_LATEST })).toBe('v1.0.0.dev-2');
|
|
43
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
44
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
45
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
46
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
47
|
-
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.
|
|
48
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RC_STAGING })).toBe('v1.0.0.rc-2');
|
|
49
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RC_PROD })).toBe('v1.0.0.rc-2');
|
|
50
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RC_STAGING_LATEST })).toBe('v1.0.0.rc-2');
|
|
51
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RC_PROD_LATEST })).toBe('v1.0.0.rc-2');
|
|
52
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_STAGING })).toBe('v1.0.0-2');
|
|
53
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_PROD })).toBe('v1.0.0-2');
|
|
54
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_STAGING_LATEST })).toBe('v1.0.0-2');
|
|
55
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_PROD_LATEST })).toBe('v1.0.0-2');
|
|
56
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_STAGING_DIST })).toBe('v1.0.0-2');
|
|
57
|
+
expect((0, resolveBuildVersion_1.resolveBuildVersion)({ platform, flavour, scheme: constants_1.BuildSchemes.RELEASE_STAGING_DIST })).toBe('v1.0.0-2');
|
|
48
58
|
});
|
|
49
59
|
});
|
|
50
60
|
});
|
|
@@ -9,7 +9,7 @@ jest.mock('../../resolvers/resolveBuildVersionOffset');
|
|
|
9
9
|
const c = {
|
|
10
10
|
platform: constants_1.Platforms.WEBTV,
|
|
11
11
|
runtime: {
|
|
12
|
-
scheme: constants_1.BuildSchemes.
|
|
12
|
+
scheme: constants_1.BuildSchemes.RELEASE_PROD_LATEST,
|
|
13
13
|
appId: 'flavour1',
|
|
14
14
|
},
|
|
15
15
|
buildConfig: {
|
|
@@ -64,30 +64,30 @@ describe('resolveDeployLocations', () => {
|
|
|
64
64
|
platforms: {
|
|
65
65
|
hbbtv: {
|
|
66
66
|
flavour3: {
|
|
67
|
-
indexUrl: 'http://nxg-bigscreen-test.24imedia.tv/appName/flavour3/latest/release/public/index.html',
|
|
68
|
-
packageUrl: `${bucketBaseUrl}/builds/hbbtv/flavour3/latest/release/build/appName_hbbtv_latest.
|
|
67
|
+
indexUrl: 'http://nxg-bigscreen-test.24imedia.tv/appName/flavour3/latest/release/production/public/index.html',
|
|
68
|
+
packageUrl: `${bucketBaseUrl}/builds/hbbtv/flavour3/latest/release/production/build/appName_hbbtv_latest.release-production_flavour3.zip`,
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
tizen: {
|
|
72
72
|
flavour1: {
|
|
73
|
-
indexUrl: `${bucketBaseUrl}/builds/tizen/flavour1/latest/release/public/index.html`,
|
|
74
|
-
packageUrl: `${bucketBaseUrl}/builds/tizen/flavour1/latest/release/build/appName_tizen_latest.
|
|
73
|
+
indexUrl: `${bucketBaseUrl}/builds/tizen/flavour1/latest/release/production/public/index.html`,
|
|
74
|
+
packageUrl: `${bucketBaseUrl}/builds/tizen/flavour1/latest/release/production/build/appName_tizen_latest.release-production_flavour1.wgt`,
|
|
75
75
|
},
|
|
76
76
|
flavour2: {
|
|
77
|
-
indexUrl: `${bucketBaseUrl}/builds/tizen/flavour2/latest/release/public/index.html`,
|
|
78
|
-
packageUrl: `${bucketBaseUrl}/builds/tizen/flavour2/latest/release/build/appName_tizen_latest.
|
|
77
|
+
indexUrl: `${bucketBaseUrl}/builds/tizen/flavour2/latest/release/production/public/index.html`,
|
|
78
|
+
packageUrl: `${bucketBaseUrl}/builds/tizen/flavour2/latest/release/production/build/appName_tizen_latest.release-production_flavour2.wgt`,
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
81
|
webtv: {
|
|
82
82
|
flavour1: {
|
|
83
|
-
indexUrl: `${bucketBaseUrl}/builds/webtv/flavour1/latest/release/public/index.html`,
|
|
84
|
-
packageUrl: `${bucketBaseUrl}/builds/webtv/flavour1/latest/release/build/appName_webtv_latest.
|
|
83
|
+
indexUrl: `${bucketBaseUrl}/builds/webtv/flavour1/latest/release/production/public/index.html`,
|
|
84
|
+
packageUrl: `${bucketBaseUrl}/builds/webtv/flavour1/latest/release/production/build/appName_webtv_latest.release-production_flavour1.zip`,
|
|
85
85
|
},
|
|
86
86
|
},
|
|
87
87
|
xbox: {
|
|
88
88
|
flavour1: {
|
|
89
|
-
indexUrl: `${bucketBaseUrl}/builds/xbox/flavour1/latest/release/public/index.html`,
|
|
90
|
-
packageUrl: `${bucketBaseUrl}/builds/xbox/flavour1/latest/release/build/appName_xbox_latest.
|
|
89
|
+
indexUrl: `${bucketBaseUrl}/builds/xbox/flavour1/latest/release/production/public/index.html`,
|
|
90
|
+
packageUrl: `${bucketBaseUrl}/builds/xbox/flavour1/latest/release/production/build/appName_xbox_latest.release-production_flavour1.zip`,
|
|
91
91
|
},
|
|
92
92
|
},
|
|
93
93
|
},
|
|
@@ -15,21 +15,33 @@ describe('resolveHbbtvDeployUrl', () => {
|
|
|
15
15
|
it('returns proper URL for "latest development" build schemes', () => {
|
|
16
16
|
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.DEV_LATEST, 'flavour')).toBe(`${baseUrl}/appName/flavour/latest/dev/public/index.html`);
|
|
17
17
|
});
|
|
18
|
-
it('returns proper URL for "latest release candidate" build schemes', () => {
|
|
19
|
-
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.
|
|
18
|
+
it('returns proper URL for "latest release candidate (staging)" build schemes', () => {
|
|
19
|
+
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.RC_STAGING_LATEST, 'flavour')).toBe(`${baseUrl}/appName/flavour/latest/rc/staging/public/index.html`);
|
|
20
20
|
});
|
|
21
|
-
it('returns proper URL for "latest release" build schemes', () => {
|
|
22
|
-
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.
|
|
21
|
+
it('returns proper URL for "latest release candidate (production)" build schemes', () => {
|
|
22
|
+
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.RC_PROD_LATEST, 'flavour')).toBe(`${baseUrl}/appName/flavour/latest/rc/production/public/index.html`);
|
|
23
23
|
});
|
|
24
|
-
it('returns proper URL for "
|
|
25
|
-
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.
|
|
24
|
+
it('returns proper URL for "latest release (staging)" build schemes', () => {
|
|
25
|
+
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.RELEASE_STAGING_LATEST, 'flavour')).toBe(`${baseUrl}/appName/flavour/latest/release/staging/public/index.html`);
|
|
26
|
+
});
|
|
27
|
+
it('returns proper URL for "latest release (production)" build schemes', () => {
|
|
28
|
+
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.RELEASE_PROD_LATEST, 'flavour')).toBe(`${baseUrl}/appName/flavour/latest/release/production/public/index.html`);
|
|
29
|
+
});
|
|
30
|
+
it('returns proper URL for "distribution release (staging)" build schemes', () => {
|
|
31
|
+
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.RELEASE_STAGING_DIST, 'flavour')).toBe(`${baseUrl}/appName/flavour/dist/v1.0.0/staging/public/index.html`);
|
|
32
|
+
});
|
|
33
|
+
it('returns proper URL for "distribution release (production)" build schemes', () => {
|
|
34
|
+
expect((0, resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl)(c, constants_1.BuildSchemes.RELEASE_PROD_DIST, 'flavour')).toBe(`${baseUrl}/appName/flavour/dist/v1.0.0/production/public/index.html`);
|
|
26
35
|
});
|
|
27
36
|
it('returns empty string for all other build schemes', () => {
|
|
28
37
|
const ignoredBuildSchemes = [
|
|
29
38
|
constants_1.BuildSchemes.DEV_LATEST,
|
|
30
|
-
constants_1.BuildSchemes.
|
|
31
|
-
constants_1.BuildSchemes.
|
|
32
|
-
constants_1.BuildSchemes.
|
|
39
|
+
constants_1.BuildSchemes.RC_STAGING_LATEST,
|
|
40
|
+
constants_1.BuildSchemes.RC_PROD_LATEST,
|
|
41
|
+
constants_1.BuildSchemes.RELEASE_STAGING_LATEST,
|
|
42
|
+
constants_1.BuildSchemes.RELEASE_PROD_LATEST,
|
|
43
|
+
constants_1.BuildSchemes.RELEASE_STAGING_DIST,
|
|
44
|
+
constants_1.BuildSchemes.RELEASE_PROD_DIST,
|
|
33
45
|
];
|
|
34
46
|
Object
|
|
35
47
|
.values(constants_1.BuildSchemes)
|