Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions .detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ module.exports = {
},
'ios.sim.main.ci': {
device: 'ios.simulator',
app: 'ios.debug',
}
app: 'ios.main.release',
},
'ios.sim.flask.ci': {
device: 'ios.simulator',
app: 'ios.flask.release',
},
},
devices: {
'ios.simulator': {
Expand Down Expand Up @@ -110,42 +114,44 @@ module.exports = {
'ios.main.release': {
type: 'ios.app',
binaryPath:
'ios/build/Build/Products/Release-iphonesimulator/MetaMask.app',
build: `yarn build:ios:main:e2e`,
process.env.PREBUILT_IOS_APP_PATH || 'ios/build/Build/Products/Release-iphonesimulator/MetaMask.app',
build: `export CONFIGURATION="Release" && yarn build:ios:main:e2e`,
},
'ios.flask.debug': {
type: 'ios.app',
binaryPath:
'ios/build/Build/Products/Debug-iphonesimulator/MetaMask-Flask.app',
build: 'yarn start:ios:e2e:flask',
process.env.PREBUILT_IOS_APP_PATH || 'ios/build/Build/Products/Debug-iphonesimulator/MetaMask-Flask.app',
build: 'export CONFIGURATION="Debug" && yarn build:ios:flask:e2e',
},
'ios.flask.release': {
type: 'ios.app',
binaryPath:
'ios/build/Build/Products/Release-iphonesimulator/MetaMask-Flask.app',
build: `yarn build:ios:flask:e2e`,
process.env.PREBUILT_IOS_APP_PATH || 'ios/build/Build/Products/Release-iphonesimulator/MetaMask-Flask.app',
build: `export CONFIGURATION="Release" && yarn build:ios:flask:e2e`,
},
'android.debug': {
type: 'android.apk',
binaryPath: process.env.PREBUILT_ANDROID_APK_PATH || 'android/app/build/outputs/apk/prod/debug/app-prod-debug.apk',
testBinaryPath: process.env.PREBUILT_ANDROID_TEST_APK_PATH,
build: 'yarn start:android:e2e',
build: 'export CONFIGURATION="Debug" && yarn build:android:main:e2e',
},
'android.flask.debug': {
'android.release': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/flask/debug/app-flask-debug.apk',
testBinaryPath: 'android/app/build/outputs/apk/androidTest/flask/debug/app-flask-debug-androidTest.apk',
build: 'yarn start:android:e2e:flask',
binaryPath: process.env.PREBUILT_ANDROID_APK_PATH || 'android/app/build/outputs/apk/prod/release/app-prod-release.apk',
testBinaryPath: process.env.PREBUILT_ANDROID_TEST_APK_PATH,
build: `export CONFIGURATION="Release" && yarn build:android:main:e2e`,
},
'android.release': {
'android.flask.debug': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/prod/release/app-prod-release.apk',
build: `yarn build:android:main:e2e`,
binaryPath: process.env.PREBUILT_ANDROID_APK_PATH || 'android/app/build/outputs/apk/flask/debug/app-flask-debug.apk',
testBinaryPath: process.env.PREBUILT_ANDROID_TEST_APK_PATH,
build: 'export CONFIGURATION="Debug" && yarn build:android:flask:e2e',
},
'android.flask.release': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/flask/release/app-flask-release.apk',
build: `yarn build:android:flask:e2e`,
binaryPath: process.env.PREBUILT_ANDROID_APK_PATH || 'android/app/build/outputs/apk/flask/release/app-flask-release.apk',
testBinaryPath: process.env.PREBUILT_ANDROID_TEST_APK_PATH,
build: `export CONFIGURATION="Release" && yarn build:android:flask:e2e`,
},
},
};
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ app/core/Engine/index.ts @MetaMask/mobile-pla
app/core/Engine/README.md @MetaMask/mobile-platform
app/core/Engine/types.ts @MetaMask/mobile-platform
app/core/Engine/controllers/remote-feature-flag-controller/ @MetaMask/mobile-platform
app/core/DeeplinkManager @MetaMask/mobile-platform
app/core/DeeplinkManager/Handlers/handlePerpsUrl.ts @MetaMask/perps
app/core/DeeplinkManager @MetaMask/mobile-platform
scripts/build.sh @MetaMask/mobile-platform

# Platform & Snaps Code Fencing File
metro.transform.js @MetaMask/mobile-platform @MetaMask/core-platform
Expand Down Expand Up @@ -145,6 +145,7 @@ app/components/UI/Perps/ @MetaMask/perps
app/components/UI/WalletAction/*perps* @MetaMask/perps
app/core/Engine/controllers/perps-controller @MetaMask/perps
app/core/Engine/messengers/perps-controller-messenger @MetaMask/perps
app/core/DeeplinkManager/Handlers/handlePerpsUrl.ts @MetaMask/perps
**/Perps/** @MetaMask/perps
**/perps/** @MetaMask/perps

Expand Down
181 changes: 9 additions & 172 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ pipelines:
create_qa_builds_pipeline:
stages:
- create_build_qa: {}
#Creates MetaMask-QA Flask apps and stores apk/ipa in Bitrise & browserstack
create_qa_flask_builds_pipeline:
stages:
- create_build_qa_flask: {}
#Builds MetaMask, MetaMask-QA apps and stores apk/ipa in Bitrise
build_all_targets_pipeline:
stages:
Expand All @@ -30,7 +26,6 @@ pipelines:
- bump_version_stage: {}
- create_build_qa: {}
- bump_version_stage: {}
- create_build_qa_flask: {}
#Releases MetaMask apps and stores apk/ipa into Play(Internal Testing)/App(TestFlight) Store
release_builds_to_store_pipeline:
stages:
Expand Down Expand Up @@ -199,8 +194,6 @@ stages:
workflows:
- build_android_release: {}
- build_ios_release: {}
- build_android_beta: {}
- build_ios_beta: {}
- build_android_flask_release: {}
- build_ios_flask_release: {}
- build_android_qa: {}
Expand Down Expand Up @@ -268,11 +261,6 @@ stages:
- build_android_qa_devbuild: {}
- build_ios_qa_devbuild: {}
- build_ios_qa_simbuild: {}
# TODO: This workflow doesn't make sense since both QA and Flask are targets. Need to refactor.
create_build_qa_flask:
workflows:
- build_android_qa_flask: {}
- build_ios_qa_flask: {}
create_build_qa:
workflows:
- build_android_qa: {}
Expand Down Expand Up @@ -2335,16 +2323,8 @@ workflows:
node -v
if [ -n "$COMMAND_YARN" ]; then
GIT_BRANCH=$BITRISE_GIT_BRANCH yarn "$COMMAND_YARN"
elif [ "$IS_DEV_BUILD" = "true" ]; then #EXPO BUILD
GIT_BRANCH=$BITRISE_GIT_BRANCH yarn build:android:main:dev
elif [ "$METAMASK_BUILD_TYPE" = "main" ]; then
yarn build:android:pre-release:bundle
elif [ "$METAMASK_BUILD_TYPE" = "beta" ]; then
yarn build:android:pre-release:bundle:beta
elif [ "$METAMASK_BUILD_TYPE" = "flask" ]; then
yarn build:android:pre-release:bundle:flask
else
echo "Error: Invalid build type specified: $METAMASK_BUILD_TYPE"
echo "No COMMAND_YARN provided"
exit 1
fi
- deploy-to-bitrise-io@2.2.3:
Expand Down Expand Up @@ -2682,6 +2662,7 @@ workflows:
machine_type_id: elite-xl
build_android_main_prod:
envs:
- CONFIGURATION: 'Release'
- NAME: $VERSION_NAME
- NUMBER: $VERSION_NUMBER
- KEYSTORE_FILE_PATH: $BITRISEIO_ANDROID_KEYSTORE_URL
Expand All @@ -2697,6 +2678,7 @@ workflows:
machine_type_id: elite-xl
build_android_main_beta:
envs:
- CONFIGURATION: 'Release'
- COMMAND_YARN: 'build:android:main:beta'
- NAME: $VERSION_NAME
- NUMBER: $VERSION_NUMBER
Expand All @@ -2712,6 +2694,7 @@ workflows:
machine_type_id: elite-xl
build_android_main_rc:
envs:
- CONFIGURATION: 'Release'
- COMMAND_YARN: 'build:android:main:rc'
- NAME: $VERSION_NAME
- NUMBER: $VERSION_NUMBER
Expand All @@ -2727,6 +2710,7 @@ workflows:
machine_type_id: elite-xl
build_android_main_test:
envs:
- CONFIGURATION: 'Release'
- COMMAND_YARN: 'build:android:main:test'
- NAME: $VERSION_NAME
- NUMBER: $VERSION_NUMBER
Expand All @@ -2742,6 +2726,7 @@ workflows:
machine_type_id: elite-xl
build_android_main_e2e:
envs:
- CONFIGURATION: 'Release'
- COMMAND_YARN: 'build:android:main:e2e'
- NAME: $VERSION_NAME
- NUMBER: $VERSION_NUMBER
Expand All @@ -2758,6 +2743,7 @@ workflows:
machine_type_id: elite-xl
build_android_main_exp:
envs:
- CONFIGURATION: 'Release'
- COMMAND_YARN: 'build:android:main:exp'
- NAME: $VERSION_NAME
- NUMBER: $VERSION_NUMBER
Expand All @@ -2771,22 +2757,6 @@ workflows:
bitrise.io:
stack: linux-docker-android-22.04
machine_type_id: elite-xl
build_android_beta:
envs:
- METAMASK_BUILD_TYPE: 'beta'
- METAMASK_ENVIRONMENT: 'production'
- NAME: $VERSION_NAME
- NUMBER: $VERSION_NUMBER
- KEYSTORE_FILE_PATH: $BITRISEIO_ANDROID_KEYSTORE_URL
- KEYSTORE_PATH: 'android/keystores/release.keystore'
- APP_NAME: 'prod'
- OUTPUT_PATH: 'prodRelease'
after_run:
- _android_build_template
meta:
bitrise.io:
stack: linux-docker-android-22.04
machine_type_id: elite-xl
build_android_release_and_upload_sourcemaps:
envs:
- SENTRY_DISABLE_AUTO_UPLOAD: 'false'
Expand Down Expand Up @@ -2815,6 +2785,7 @@ workflows:
machine_type_id: elite-xl
build_android_main_dev:
envs:
- CONFIGURATION: 'Debug'
- IS_DEV_BUILD: 'true'
- NAME: $VERSION_NAME
- NUMBER: $VERSION_NUMBER
Expand Down Expand Up @@ -2896,72 +2867,6 @@ workflows:
after_run:
- build_android_qa_prod
- _upload_apk_to_browserstack_qa
build_android_qa_flask:
before_run:
- code_setup
after_run:
- _upload_apk_to_browserstack_flask
- notify_failure
steps:
- change-android-versioncode-and-versionname@1:
inputs:
- new_version_name: $FLASK_VERSION_NAME
- new_version_code: $FLASK_VERSION_NUMBER
- build_gradle_path: $PROJECT_LOCATION_ANDROID/app/build.gradle
- file-downloader@1:
inputs:
- source: $BITRISEIO_ANDROID_QA_KEYSTORE_URL
- destination: android/keystores/internalRelease.keystore
- restore-gradle-cache@2: {}
- install-missing-android-tools@3:
inputs:
- ndk_version: $NDK_VERSION
- gradlew_path: $PROJECT_LOCATION/gradlew
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
node -v
export METAMASK_ENVIRONMENT='qa'
export METAMASK_BUILD_TYPE='flask'
GIT_BRANCH=$BITRISE_GIT_BRANCH yarn build:android:pre-release:bundle:flask
title: Build Android Flask Pre-Release Bundle
is_always_run: false
- save-gradle-cache@1: {}
- deploy-to-bitrise-io@2.2.3:
is_always_run: false
is_skippable: true
inputs:
- deploy_path: $PROJECT_LOCATION/app/build/outputs/apk/flask/release/app-flask-release.apk
title: Bitrise Deploy Flask APK
- deploy-to-bitrise-io@2.2.3:
is_always_run: false
is_skippable: true
inputs:
- deploy_path: $PROJECT_LOCATION/app/build/outputs/apk/flask/release/sha512sums.txt
title: Bitrise Deploy Flask Checksum
- deploy-to-bitrise-io@2.2.3:
is_always_run: false
is_skippable: true
inputs:
- deploy_path: $PROJECT_LOCATION/app/build/outputs/mapping/flaskRelease/mapping.txt
title: Bitrise Deploy Flask ProGuard Map Files
- deploy-to-bitrise-io@2.2.3:
is_always_run: false
is_skippable: true
inputs:
- deploy_path: $PROJECT_LOCATION/app/build/outputs/bundle/flaskRelease/app-flask-release.aab
title: Bitrise Deploy Flask AAB
- deploy-to-bitrise-io@2.2.3:
is_always_run: false
is_skippable: true
inputs:
- deploy_path: sourcemaps/android/index.js.map
title: Bitrise Deploy Flask Sourcemaps
meta:
bitrise.io:
stack: linux-docker-android-22.04
machine_type_id: elite-xl
_upload_apk_to_browserstack_flask:
steps:
- script@1:
Expand Down Expand Up @@ -3167,24 +3072,8 @@ workflows:
echo 'This is the current build type: $METAMASK_BUILD_TYPE'
if [ -n "$COMMAND_YARN" ]; then
GIT_BRANCH=$BITRISE_GIT_BRANCH yarn "$COMMAND_YARN"
elif [ "$IS_DEV_BUILD" = "true" ]; then #EXPO BUILD
if [ "$IS_SIM_BUILD" = "true" ]; then
if [ "$METAMASK_BUILD_TYPE" = "flask" ]; then
GIT_BRANCH=$BITRISE_GIT_BRANCH yarn start:ios:e2e:flask
else
GIT_BRANCH=$BITRISE_GIT_BRANCH yarn start:ios:e2e
fi
else
GIT_BRANCH=$BITRISE_GIT_BRANCH yarn build:ios:main:dev
fi
elif [ "$METAMASK_BUILD_TYPE" = "main" ]; then
yarn build:ios:pre-release
elif [ "$METAMASK_BUILD_TYPE" = "beta" ]; then
yarn build:ios:pre-beta
elif [ "$METAMASK_BUILD_TYPE" = "flask" ]; then
yarn build:ios:pre-flask
else
echo "Error: Invalid build type specified: $METAMASK_BUILD_TYPE"
echo "No COMMAND_YARN provided"
exit 1
fi
- deploy-to-bitrise-io@2.2.3:
Expand Down Expand Up @@ -3379,17 +3268,6 @@ workflows:
- SENTRY_DISABLE_AUTO_UPLOAD: 'false'
after_run:
- build_ios_main_rc
build_ios_beta:
envs:
- CONFIGURATION: 'Release'
- METAMASK_BUILD_TYPE: "beta"
- METAMASK_ENVIRONMENT: 'production'
- NAME: $VERSION_NAME
- NUMBER: $VERSION_NUMBER
- APP_NAME: "MetaMask"
- INFO_PLIST_NAME: "Info.plist"
after_run:
- _ios_build_template
# TODO: Remove this workflow once new build configuration is consolidated
build_ios_flask_release:
after_run:
Expand Down Expand Up @@ -3588,47 +3466,6 @@ workflows:
- pipeline_intermediate_files: sourcemaps/ios/index.js.map:BITRISE_APP_STORE_SOURCEMAP_PATH
- deploy_path: sourcemaps/ios/index.js.map
title: Deploy Source Map
build_ios_qa_flask:
before_run:
- code_setup
after_run:
- _upload_ipa_to_browserstack_flask
- notify_failure
steps:
- certificate-and-profile-installer@1: {}
- set-xcode-build-number@1:
inputs:
- build_short_version_string: $FLASK_VERSION_NAME
- build_version: $FLASK_VERSION_NUMBER
- plist_path: $PROJECT_LOCATION_IOS/MetaMask/MetaMask-Flask-Info.plist
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
node -v
GIT_BRANCH=$BITRISE_GIT_BRANCH METAMASK_BUILD_TYPE='flask' METAMASK_ENVIRONMENT='qa' yarn build:ios:pre-flask
title: iOS Flask Sourcemaps & Build
is_always_run: false
- deploy-to-bitrise-io@2.2.3:
is_always_run: false
is_skippable: true
inputs:
- pipeline_intermediate_files: ios/build/output/MetaMask-Flask.ipa:BITRISE_APP_STORE_FLASK_IPA_PATH
- deploy_path: ios/build/output/MetaMask-Flask.ipa
title: Deploy iOS Flask IPA
- deploy-to-bitrise-io@2.2.3:
is_always_run: false
is_skippable: true
inputs:
- deploy_path: ios/build/MetaMask-Flask.xcarchive
title: Deploy Flask Symbols File
- deploy-to-bitrise-io@2.2.3:
is_always_run: false
is_skippable: true
inputs:
- pipeline_intermediate_files: sourcemaps/ios/index.js.map:BITRISE_APP_STORE_FLASK_SOURCEMAP_PATH
- deploy_path: sourcemaps/ios/index.js.map
title: Deploy Flask Source Map
_upload_ipa_to_browserstack_flask:
steps:
- script@1:
Expand Down
Loading
Loading