setup method

dynamic setup(
  1. bool updateUnity
)

Implementation

setup(bool updateUnity) {
  workspace = env('WORKSPACE');
  iosHookUrl = env('IOS_HOOK_URL');
  androidHookUrl = env('ANDROID_HOOK_URL');
  appStoreConnectApiKeyId = env('APP_STORE_CONNECT_API_KEY_ID');
  appStoreConnectApiIssuerId = env('APP_STORE_CONNECT_API_ISSUER_ID');
  appStoreConnectApiKeyFilepath = env('APP_STORE_CONNECT_API_KEY_FILEPATH');
  appIdentifier = env('APP_IDENTIFIER');
  appId = env('APP_ID');
  pgyerApiKey = env('PGYER_API_KEY');
  if (updateUnity) {
    final unityWorkspace = env('UNITY_WORKSPACE');
    final iosUnityPath = env('IOS_UNITY_PATH');
    final androidUnityPath = env('ANDROID_UNITY_PATH');
    final unityEnginePath = env('UNITY_ENGINE_PATH');
    unityEnvironment = UnityEnvironment(
      unityWorkspace: unityWorkspace,
      iosUnityPath: iosUnityPath,
      androidUnityPath: androidUnityPath,
      unityEnginePath: unityEnginePath,
    );
  }

  buildName = env('BUILD_NAME');
  dingdingIosHookUrl = env('DINGDING_IOS_HOOK_URL');
  dingdingAndroidHookUrl = env('DINGDING_ANDROID_HOOK_URL');
  branch = env('BRANCH').replaceFirst('origin/', '');
}