How can I env variables in fastlane for creating the template

雨燕双飞 提交于 2020-01-16 18:51:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!