diff --git a/.github/workflows/release_dapp_android_internal.yml b/.github/workflows/release_dapp_android_internal.yml index d8570a0..12a1d82 100644 --- a/.github/workflows/release_dapp_android_internal.yml +++ b/.github/workflows/release_dapp_android_internal.yml @@ -60,4 +60,4 @@ jobs: fastlane release_firebase project_id:$PROJECT_ID app_version:$VERSION_NUMBER # Launch locally -# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_dapp_android.yml +# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_dapp_android_internal.yml diff --git a/.github/workflows/release_wallet_android_internal.yml b/.github/workflows/release_wallet_android_internal.yml index aca217e..59051f8 100644 --- a/.github/workflows/release_wallet_android_internal.yml +++ b/.github/workflows/release_wallet_android_internal.yml @@ -8,7 +8,6 @@ on: jobs: build: - # if: github.event.pull_request.merged == true if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch' runs-on: macos-latest-xlarge diff --git a/example/dapp/android/fastlane/Fastfile b/example/dapp/android/fastlane/Fastfile index 5edc983..2f0aac5 100644 --- a/example/dapp/android/fastlane/Fastfile +++ b/example/dapp/android/fastlane/Fastfile @@ -55,7 +55,12 @@ platform :android do _latest_release = firebase_app_distribution_get_latest_release( app: "#{firebase_dapp_id}", ) - _new_build_number = _latest_release[:buildVersion].to_i + 1 + if _latest_release && _latest_release[:buildVersion] && !_latest_release[:buildVersion].empty? + _new_build_number = _latest_release[:buildVersion].to_i + 1 + else + _new_build_number = 1 + end + _app_version = "#{options[:app_version]}" _project_id = "#{options[:project_id]}" diff --git a/example/dapp/ios/fastlane/Fastfile b/example/dapp/ios/fastlane/Fastfile index 6773d1f..b09595e 100644 --- a/example/dapp/ios/fastlane/Fastfile +++ b/example/dapp/ios/fastlane/Fastfile @@ -80,7 +80,12 @@ platform :ios do app_identifier: "#{app_identifier}", username: options[:username], ) - new_build_number = number + 1 + if number && !number.to_s.empty? + new_build_number = number.to_i + 1 + else + # Handle the case where there is no previous build number + new_build_number = 1 + end increment_build_number( build_number: new_build_number, diff --git a/example/wallet/android/fastlane/Fastfile b/example/wallet/android/fastlane/Fastfile index 7e81840..1f69e86 100644 --- a/example/wallet/android/fastlane/Fastfile +++ b/example/wallet/android/fastlane/Fastfile @@ -55,7 +55,12 @@ platform :android do _latest_release = firebase_app_distribution_get_latest_release( app: "#{firebase_wallet_id}", ) - _new_build_number = _latest_release[:buildVersion].to_i + 1 + if _latest_release && _latest_release[:buildVersion] && !_latest_release[:buildVersion].empty? + _new_build_number = _latest_release[:buildVersion].to_i + 1 + else + _new_build_number = 1 + end + _app_version = "#{options[:app_version]}" _project_id = "#{options[:project_id]}" diff --git a/example/wallet/ios/fastlane/Fastfile b/example/wallet/ios/fastlane/Fastfile index 73819ad..c645abf 100644 --- a/example/wallet/ios/fastlane/Fastfile +++ b/example/wallet/ios/fastlane/Fastfile @@ -79,7 +79,12 @@ platform :ios do app_identifier: "#{app_identifier}", username: options[:username], ) - new_build_number = number + 1 + if number && !number.to_s.empty? + new_build_number = number.to_i + 1 + else + # Handle the case where there is no previous build number + new_build_number = 1 + end increment_build_number( build_number: new_build_number,