Issue:
You need to use an Environment Variable (Env Var) in multiple builds and change its value during each build. For example, your build needs a counter that is incremented with each build.
Possible solutions:
1. Use the envman
tool which creates an .envstore file that can be cached.
2. Use the Bitrise.io Cache:Push Step to cache the file and the Bitrise.io Cache:Pull Step to retrieve the file.
Here is an example of adding an Env Var MY_TEST_ENV_KEY
and setting the value to test value for test key
:
envman add --key MY_TEST_ENV_KEY --value 'test value for test key'
Additional information:
Learn how envman works.
Learn more about caching.