问题
I have build and distributed my iOS app using fastlane, for that I have created script in fast file, so now I want pass the env variable in this script for creating the template, this same template I can use my other iOS apps as well, so how can I pass env variables in my fastlane script?
回答1:
Fastfile
and Co are just Ruby code, so you can use ENV['XYZ']
to access any environment variables.
To set environment variables, there are multiple options in fastlane. Some are described at https://docs.fastlane.tools/advanced/other/#environment-variables
Fastlane also supports dotenv
to set environment variables via files: https://docs.fastlane.tools/best-practices/keys/#dotenv
来源:https://stackoverflow.com/questions/56357389/how-can-i-env-variables-in-fastlane-for-creating-the-template