2023-04-25 16:32:51 +02:00
|
|
|
# TODO(ritave): Add support for environments (<root>/development/build/constants.js:@ENVIRONMENT)
|
|
|
|
# TODO(ritave): Add support for build targets (<root>/development/build/constants.js:@BUILD_TARGETS)
|
|
|
|
# TODO(ritave): Warn if not all of declared variables have been defined / used
|
|
|
|
|
|
|
|
# The priority order of variable definitions (most important to least important):
|
|
|
|
# <hardcoded build code>; <environmental variables>; .metamaskprodrc; .metamaskrc; builds.yml:.buildTypes.<type>.env; builds.yml:.features.<feature>.env; builds.yml:.env
|
|
|
|
|
|
|
|
# The build type to use when no build type provided in the cli
|
|
|
|
default: &default main
|
|
|
|
|
|
|
|
# Declaration of build types
|
|
|
|
# Each build type is composed of features, env variables and assets.
|
|
|
|
# Also known as productFlavors in Android lingo
|
|
|
|
buildTypes:
|
|
|
|
main:
|
|
|
|
features:
|
|
|
|
- build-main
|
|
|
|
# Additional env variables that are specific to this build
|
|
|
|
env:
|
|
|
|
- INFURA_PROD_PROJECT_ID
|
|
|
|
- SEGMENT_PROD_WRITE_KEY
|
|
|
|
- INFURA_ENV_KEY_REF: INFURA_PROD_PROJECT_ID
|
|
|
|
- SEGMENT_WRITE_KEY_REF: SEGMENT_PROD_WRITE_KEY
|
2023-05-05 18:40:43 +02:00
|
|
|
# Main build uses the default browser manifest
|
|
|
|
manifestOverrides: false
|
2023-04-25 16:32:51 +02:00
|
|
|
|
|
|
|
beta:
|
|
|
|
features:
|
|
|
|
- build-beta
|
|
|
|
env:
|
|
|
|
- INFURA_BETA_PROJECT_ID
|
|
|
|
- SEGMENT_BETA_WRITE_KEY
|
|
|
|
- INFURA_ENV_KEY_REF: INFURA_BETA_PROJECT_ID
|
|
|
|
- SEGMENT_WRITE_KEY_REF: SEGMENT_BETA_WRITE_KEY
|
|
|
|
# Modifies how the version is displayed.
|
|
|
|
# eg. instead of 10.25.0 -> 10.25.0-beta.2
|
|
|
|
isPrerelease: true
|
|
|
|
# Folder which contains overrides to browser manifests
|
2023-05-05 18:40:43 +02:00
|
|
|
manifestOverrides: ./app/build-types/beta/manifest/
|
2023-04-25 16:32:51 +02:00
|
|
|
|
|
|
|
flask:
|
|
|
|
# Code surrounded using code fences for that feature
|
|
|
|
# will not be removed
|
|
|
|
features:
|
|
|
|
- snaps
|
|
|
|
- desktop
|
|
|
|
- build-flask
|
|
|
|
env:
|
|
|
|
- INFURA_FLASK_PROJECT_ID
|
|
|
|
- SEGMENT_FLASK_WRITE_KEY
|
|
|
|
- ALLOW_LOCAL_SNAPS: true
|
|
|
|
- REQUIRE_SNAPS_ALLOWLIST: false
|
2023-05-15 19:36:24 +02:00
|
|
|
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/0.16.0-flask.1/index.html
|
2023-04-25 16:32:51 +02:00
|
|
|
- SUPPORT_LINK: https://metamask-flask.zendesk.com/hc
|
|
|
|
- SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new
|
|
|
|
- INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID
|
|
|
|
- SEGMENT_WRITE_KEY_REF: SEGMENT_FLASK_WRITE_KEY
|
|
|
|
isPrerelease: true
|
2023-05-05 18:40:43 +02:00
|
|
|
manifestOverrides: ./app/build-types/flask/manifest/
|
2023-04-25 16:32:51 +02:00
|
|
|
|
|
|
|
desktop:
|
|
|
|
features:
|
|
|
|
- snaps
|
|
|
|
- desktop
|
|
|
|
- build-flask
|
|
|
|
env:
|
|
|
|
- INFURA_FLASK_PROJECT_ID
|
|
|
|
- SEGMENT_FLASK_WRITE_KEY
|
|
|
|
- ALLOW_LOCAL_SNAPS: true
|
|
|
|
- REQUIRE_SNAPS_ALLOWLIST: false
|
2023-05-15 19:36:24 +02:00
|
|
|
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/0.16.0-flask.1/index.html
|
2023-04-25 16:32:51 +02:00
|
|
|
- SUPPORT_LINK: https://metamask-flask.zendesk.com/hc
|
|
|
|
- SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new
|
|
|
|
- INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID
|
|
|
|
- SEGMENT_WRITE_KEY_REF: SEGMENT_FLASK_WRITE_KEY
|
|
|
|
isPrerelease: true
|
2023-05-05 18:40:43 +02:00
|
|
|
manifestOverrides: ./app/build-types/desktop/manifest/
|
2023-04-25 16:32:51 +02:00
|
|
|
|
|
|
|
mmi:
|
|
|
|
features:
|
|
|
|
- build-mmi
|
|
|
|
env:
|
|
|
|
- INFURA_MMI_PROJECT_ID
|
|
|
|
- SEGMENT_MMI_WRITE_KEY
|
|
|
|
- INFURA_ENV_KEY_REF: INFURA_MMI_PROJECT_ID
|
|
|
|
- SEGMENT_WRITE_KEY_REF: SEGMENT_MMI_WRITE_KEY
|
|
|
|
- SUPPORT_LINK: https://mmi-support.zendesk.com/hc/en-us
|
|
|
|
- SUPPORT_REQUEST_LINK: https://mmi-support.zendesk.com/hc/en-us/requests/new
|
|
|
|
# For some reason, MMI uses this type of versioning
|
|
|
|
# Leaving it on for backwards compatibility
|
|
|
|
isPrerelease: true
|
2023-05-05 18:40:43 +02:00
|
|
|
manifestOverrides: ./app/build-types/mmi/manifest/
|
2023-04-25 16:32:51 +02:00
|
|
|
|
|
|
|
# Build types are composed of a set of features.
|
|
|
|
# Each feature can have code fences that add new code
|
|
|
|
# as well declaring, defining and overriding env variables
|
|
|
|
features:
|
|
|
|
snaps:
|
|
|
|
# Each feature might have variables that only exist when built with that feature active
|
|
|
|
env:
|
|
|
|
# Whether to allow snaps from localhost - local://localhost:8080/snap.manifest.json
|
|
|
|
# Enabled in Flask, will be disabled in Main
|
|
|
|
- ALLOW_LOCAL_SNAPS
|
|
|
|
# Whether to verify that a snap can be installed using an allow list
|
|
|
|
- REQUIRE_SNAPS_ALLOWLIST
|
2023-05-15 19:36:24 +02:00
|
|
|
- IFRAME_EXECUTION_ENVIRONMENT_URL
|
2023-04-25 16:32:51 +02:00
|
|
|
assets:
|
|
|
|
- ./{app,shared,ui}/**/snaps/**
|
|
|
|
desktop:
|
|
|
|
env:
|
|
|
|
- COMPATIBILITY_VERSION_EXTENSION: 1
|
|
|
|
- DISABLE_WEB_SOCKET_ENCRYPTION: false
|
|
|
|
- SKIP_OTP_PAIRING_FLOW: false
|
|
|
|
- WEB_SOCKET_PORT: null
|
|
|
|
|
|
|
|
###
|
|
|
|
# Build Type code extensions. Things like different support links, warning pages, banners
|
|
|
|
###
|
|
|
|
|
|
|
|
build-main:
|
|
|
|
build-beta:
|
|
|
|
assets:
|
|
|
|
# Assets that will be copied
|
|
|
|
- src: ./app/build-types/beta/images/
|
|
|
|
dest: images
|
|
|
|
# Assets that are exclusively included in this feature and ignored in others
|
|
|
|
# Supports globs
|
|
|
|
- ./{app,shared,ui}/**/beta/**
|
|
|
|
build-mmi:
|
|
|
|
assets:
|
|
|
|
- src: ./app/build-types/mmi/images/
|
|
|
|
dest: images
|
2023-05-17 11:45:34 +02:00
|
|
|
- ./{app,shared,ui}/**/institutional/**
|
2023-04-25 16:32:51 +02:00
|
|
|
build-flask:
|
|
|
|
assets:
|
|
|
|
- src: ./app/build-types/flask/images/
|
|
|
|
dest: images
|
|
|
|
- ./{app,shared,ui}/**/flask/**
|
|
|
|
|
|
|
|
# Env variables that are required for all types of builds
|
|
|
|
#
|
|
|
|
# env object supports both declarations (- FOO), and definitions (- FOO: BAR).
|
|
|
|
# Variables that were declared have to be defined somewhere in the load chain before usage
|
|
|
|
env:
|
|
|
|
- SWAPS_USE_DEV_APIS: false
|
|
|
|
- PORTFOLIO_URL: https://portfolio.metamask.io
|
|
|
|
- TOKEN_ALLOWANCE_IMPROVEMENTS: false
|
|
|
|
- TRANSACTION_SECURITY_PROVIDER: false
|
|
|
|
# The unlock password
|
|
|
|
- PASSWORD: null
|
|
|
|
# Also see METAMASK_DEBUG and NODE_DEBUG
|
|
|
|
- DEBUG: null
|
|
|
|
- SUPPORT_LINK: https://support.metamask.io
|
|
|
|
- SUPPORT_REQUEST_LINK: https://metamask.zendesk.com/hc/en-us
|
|
|
|
- SKIP_BACKGROUND_INITIALIZATION: false
|
|
|
|
- MULTICHAIN: false
|
|
|
|
|
|
|
|
# TODO(ritave): Move ManifestV3 into a feature?
|
|
|
|
- ENABLE_MV3: false
|
|
|
|
- HARDWARE_WALLETS_MV3: false
|
|
|
|
# These are exclusively used for MV3
|
|
|
|
- APPLY_LAVAMOAT
|
|
|
|
- FILE_NAMES
|
|
|
|
|
2023-05-05 17:55:41 +02:00
|
|
|
# This variable is read by Trezor's source and breaks build if not included
|
|
|
|
- ASSET_PREFIX: null
|
|
|
|
|
2023-04-25 16:32:51 +02:00
|
|
|
###
|
|
|
|
# API keys to 3rd party services
|
|
|
|
###
|
|
|
|
|
|
|
|
- PUBNUB_PUB_KEY: null
|
|
|
|
- PUBNUB_SUB_KEY: null
|
|
|
|
- SEGMENT_HOST: null
|
|
|
|
- SENTRY_DSN: null
|
|
|
|
- SENTRY_DSN_DEV: null
|
|
|
|
- OPENSEA_KEY: null
|
|
|
|
- ETHERSCAN_KEY: null
|
|
|
|
# also INFURA_PROJECT_ID below
|
|
|
|
|
|
|
|
###
|
|
|
|
# Build system backwards compatibility
|
|
|
|
###
|
|
|
|
|
|
|
|
- INFURA_ENV_KEY_REF
|
|
|
|
- SEGMENT_WRITE_KEY_REF
|
|
|
|
|
|
|
|
###
|
|
|
|
# Variables that are modified with hardcoded code
|
|
|
|
###
|
|
|
|
|
|
|
|
# Used for debugging changes to the phishing warning page.
|
|
|
|
# Modified in <root>/development/build/scripts.js:@getPhishingWarningPageUrl
|
|
|
|
- PHISHING_WARNING_PAGE_URL: null
|
|
|
|
# Modified in <root>/development/build/scripts.js:@getInfuraProjectId
|
|
|
|
- INFURA_PROJECT_ID
|
|
|
|
# Modified in <root>/development/build/scripts.js:@getSegmentWriteKey
|
|
|
|
- SEGMENT_WRITE_KEY: ''
|
|
|
|
# Modified in <root>/development/build/scripts.js:@setEnvironmentVariables
|
|
|
|
# Also see DEBUG and NODE_DEBUG
|
|
|
|
- METAMASK_DEBUG: false
|
|
|
|
# Modified in <root>/development/build/scripts.js:@setEnvironmentVariables
|
|
|
|
- IN_TEST
|
|
|
|
# Modified in <root>/development/build/scripts.js:@setEnvironmentVariables
|
|
|
|
- METAMASK_ENVIRONMENT
|
|
|
|
# Modified in <root>/development/build/scripts.js:@setEnvironmentVariables
|
|
|
|
- METAMASK_VERSION
|
|
|
|
# Modified in <root>/development/build/scripts.js:@setEnvironmentVariables
|
|
|
|
- METAMASK_BUILD_TYPE
|
|
|
|
# Modified in <root>/development/build/scripts.js:@setEnvironmentVariables
|
|
|
|
- NODE_ENV
|
|
|
|
# Defined by node itself
|
|
|
|
# For the purposes of the build system we define it as empty below
|
|
|
|
# if it's not inside process.env
|
|
|
|
# Also see DEBUG and METAMASK_DEBUG
|
|
|
|
- NODE_DEBUG: ''
|
2023-05-10 12:33:57 +02:00
|
|
|
# Used by react-devtools-core
|
|
|
|
- EDITOR_URL: ''
|
2023-04-25 16:32:51 +02:00
|
|
|
|
|
|
|
###
|
|
|
|
# Meta variables
|
|
|
|
###
|
|
|
|
|
|
|
|
# Uses yaml anchors to DRY - https://juju.is/docs/sdk/yaml-anchors-and-aliases
|
|
|
|
- METAMASK_BUILD_TYPE_DEFAULT: *default
|