From 6bb69f749d8e01978678504ec00ac2a7f25b4805 Mon Sep 17 00:00:00 2001 From: feng Date: Thu, 18 Jul 2024 14:21:28 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9release=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- harmony/codePush/src/main/ets/CodePushBuilder.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/harmony/codePush/src/main/ets/CodePushBuilder.ts b/harmony/codePush/src/main/ets/CodePushBuilder.ts index 7e96c6510..21034fd01 100644 --- a/harmony/codePush/src/main/ets/CodePushBuilder.ts +++ b/harmony/codePush/src/main/ets/CodePushBuilder.ts @@ -17,13 +17,13 @@ export class CodePushBuilder { constructor() { let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION; let bundleInfo = bundleManager.getBundleInfoForSelfSync(bundleFlags); - let appProvisionType = bundleInfo.appInfo.appProvisionType - Logger.info(TAG, `CodePushBuilder appProvisionType:${appProvisionType}`) + let isDebug = bundleInfo.appInfo.debug + Logger.info(TAG, `CodePushBuilder isDebug:${isDebug}`) let deploymentKeyConfigName; - if (appProvisionType === 'release') { - deploymentKeyConfigName = 'production'; - } else { + if (isDebug) { deploymentKeyConfigName = 'Staging'; + } else { + deploymentKeyConfigName = 'production'; } let deploymentKey = context.resourceManager.getStringByNameSync(deploymentKeyConfigName); this.mDeploymentKey = deploymentKey;