|
@@ -14,6 +14,12 @@ module.exports = function (context) {
|
|
|
if (context.cmdLine.includes("--dev")) {
|
|
if (context.cmdLine.includes("--dev")) {
|
|
|
baseUrl = "http://192.168.6.116:8082/";
|
|
baseUrl = "http://192.168.6.116:8082/";
|
|
|
}
|
|
}
|
|
|
|
|
+ let channel = "default";
|
|
|
|
|
+ let match = context.cmdLine.match(/channel=(.+?)(\s|$)/);
|
|
|
|
|
+ if (match) {
|
|
|
|
|
+ channel = match[1];
|
|
|
|
|
+ console.log("channel: " + channel);
|
|
|
|
|
+ }
|
|
|
fs.writeFileSync(
|
|
fs.writeFileSync(
|
|
|
path.resolve(projectRoot, "www", "index.html"),
|
|
path.resolve(projectRoot, "www", "index.html"),
|
|
|
fs
|
|
fs
|
|
@@ -23,5 +29,6 @@ module.exports = function (context) {
|
|
|
.replace("${iosCFBundleVersion}", appConfig.ios_CFBundleVersion())
|
|
.replace("${iosCFBundleVersion}", appConfig.ios_CFBundleVersion())
|
|
|
.replace("${androidVersionCode}", appConfig.android_versionCode())
|
|
.replace("${androidVersionCode}", appConfig.android_versionCode())
|
|
|
.replace(/\$\{baseUrl\}/g, baseUrl)
|
|
.replace(/\$\{baseUrl\}/g, baseUrl)
|
|
|
|
|
+ .replaceAll('$channel', channel)
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|