A command line tool to setup deployment variants and working CI/CD setup for mobile projects.
Variants aims to facilitate the setup and usage of multiple deployment variants for a mobile application (iOS and Android) while also providing a fully working and rich Fastlane setup, with opt-in features for your pipelines. While achieving these goals, it also reduces the amount of sources of truth in your configuration, by relying only on the Variants Spec - a YAML configuration file generated by variants init
.
Variants spec - by default located at ./variants.yml
, relative to your project's base folder - becomes the sole source of truth and the main configuration file for your needs.
This file is responsible for:
- Specifying how many deployment variants you desire for this project and the differences between these variants (Name, Icon, Identifier, Version, and more with Custom Properties);
- Which store do you want Fastlane to deploy each variant to;
- Signing configuration. Both global (applies to all) and variant specific (overrides global);
- Custom properties. Both global (applies to all) and variant specific (overrides global). Custom properties have different destinations, so that certain properties aren't available to Fastlane but to Project and vice-versa. These can also be sourced from environment variables, perfect for secrets and tokens.
- ✅ Setup your mobile project to have multiple variants of the same application.
- ➡️ Each variant having it's own:
- Name
- Identifier
- Icon
- Version
- Specific tasks and configurations
- Anything really!
- ➡️ Each variant having it's own:
- ✅ Setup CI/CD using fastlane.
- ➡️ Lanes for specific tasks:
- Setup CI
- Create Keychain
- Perform Unit and UI tests
- Lint and format
- Complexity analisys
- Sonar report
- Build and sign application
- Deploy to AppCenter / PlayStore / AppStore
- Many more!
- ➡️ Lanes for specific tasks:
See Switching Variants on CI for a better understanding and examples.
brew install backbase/m/variants
For Linux, make sure you have Swift installed by running
swift --version
git clone https://github.com/backbase/variants.git
cd variants
make install
git clone https://github.com/backbase/variants.git
cd variants
swift run variants
For usage and examples see USAGE.
Specifying your project's platform (ios
or android
) isn't always necessary. Variants is able to detect which platform your project is.
See our Platform Auto Detection for a better understanding and examples.