Mattermost Logo
We're hiring!
Edit on GitHub

Environment Variables

In order to use the make build, make build-android and/or make build-ios commands, you’ll need to set a few environment variables. In order to make fastlane work with these environment variables you have two options:

  • Copy the file with your variables to ./mattermost-mobile/fastlane/.env where .env is the file name (additionally, a sample file env_vars_example can be found in ./mattermost-mobile/fastlane/).


  • Create an .sh file with your variables (for example, and execute source in the terminal session where you will later execute the make commands.
Variable Description Default Platform
COMMIT_CHANGES_TO_GIT Should the fastlane script ensure that there are no changes to git before building the app and that every change made during the build is committed back to git.
Valid values are: true, false
false Android, iOS
BRANCH_TO_BUILD Defines the git branch that is going to be used for generating the build.
Make sure you set this value is set if to an existing branch.
master Android, iOS
GIT_LOCAL_BRANCH Defines the local branch to be created from BRANCH_TO_BUILD to ensure the base branch does not get any new commits on it.
Make sure a branch with this name does not yet exist in your local git.
Android, iOS
RESET_GIT_BRANCH Defines if once the build is done the branch should reset to the initial state before building and delete the branch created to build the app.
Valid values are: true, false
false Android, iOS
VERSION_NUMBER Set the version of the app on build time if you want to use another one than the one set in the project. Android, iOS
Set the commit message when changing the app version number. Bump app version number to Android, iOS
INCREMENT_BUILD_NUMBER Defines if the app build number should be incremented.
Valid values are: true, false
false Android, iOS
BUILD_NUMBER Set the build number of the app on build time if you want to use another than the next number. Android, iOS
Set the commit message when changing the app build number. Bump app build number to Android, iOS
APP_NAME The name of the app as it is going to be shown in the device home screen. Mattermost Beta Android, iOS
APP_SCHEME The URL naming scheme for the app as used in direct deep links to app content from outside the app. mattermost-beta Android, iOS
REPLACE_ASSETS Replaces the icons of the app with the ones found under the folder dist/assets/release/icons/ and the splash screen with the one found under the folder dist/assets/release/splash_screen/. Valid values are: true, false false Android, iOS
MAIN_APP_IDENTIFIER The bundle / package identifier for the app. com.mattermost.rnbeta Android, iOS
BUILD_FOR_RELEASE Defines if the app should be built in release mode. Valid values are: true, false
Make sure you set this value to true if you plan to submit this app to TestFlight, Google Play or distribute it in any other way.
false Android, iOS
Should the app be submitted to the Play Store once it finishes to build, use along with SUPPLY_TRACK. Valid values are: true, false false Android
SUPPLY_TRACK The track of the application to use when submitting the app to Google Play Store. Valid values are: alpha, beta, production
We strongly recommend not submitting the app to to production, instead try any of the other tracks and then promote your app using the Google Play console.
production Android
SUPPLY_PACKAGE_NAME The package Id of your application, make sure it matches MAIN_APP_IDENTIFIER. com.mattermost.rnbeta Android
SUPPLY_JSON_KEY The path to the service account json file used to authenticate with Google.
See the Supply documentation to learn more.
NOTIFICATION_SERVICE_IDENTIFIER The bundle identifier for the notification service extension. com.mattermost.rnbeta.NotificationService iOS
EXTENSION_APP_IDENTIFIER The bundle identifier for the share extension. com.mattermost.rnbeta.MattermostShare iOS
FASTLANE_TEAM_ID The ID of your Apple Developer Portal Team. iOS
IOS_ICLOUD_CONTAINER The iOS iCloud container identifier used to support iCloud storage. iOS
IOS_APP_GROUP The iOS App Group identifier used to share data between the app and the share extension. iOS
SYNC_PROVISIONING_PROFILES Should we run match to sync the provisioning profiles. Valid values are: true, false false iOS
MATCH_USERNAME Your Apple ID Username. iOS
MATCH_PASSWORD Your Apple ID Password. iOS
MATCH_KEYCHAIN_PASSWORD Your Mac user password used to install the certificates in the build computer KeyChain. iOS
MATCH_GIT_URL URL to the git repo containing all the certificates.
Make sure this git repo is set to private. Remember this repo will be used to sync the provisioning profiles and other certificates.
MATCH_APP_IDENTIFIER The Bundle Identifiers for the app (comma-separated). In our case refers to the identifiers of the app, share extension, and notification service extension com.mattermost.rnbeta,
MATCH_TYPE Define the provisioning profile type to sync. Valid values are: appstore, adhoc, development, enterprise
Make sure you set this value to the same type as the IOS_BUILD_EXPORT_METHOD as you want to have the same provisioning profiles installed in the machine so they are found when signing the app.
adhoc iOS
SUBMIT_IOS_TO_TESTFLIGHT Submit the app to TestFlight once the build finishes. Valid values are: true, false false iOS
PILOT_USERNAME Your Apple ID Username used to deploy the app to TestFlight. iOS
Do not wait until TestFlight finishes processing the app.
Valid values are: true, false
true iOS