Pre build environment variables

Hi,

I use automated builds in gitlab with fastlane to auto publish to the play store and github release. This results is my build.gradle not having a fixed versionCode or versionName. They are set by environment variables coming from the outside:

versionCode Integer.valueOf(System.env.VERSION_CODE ?: 1)
versionName "${System.env.VERSION_NAME}-${System.env.VERSION_SHA}"

These environment variables are set by my .gitlab-ci.yml. Is it possible to tell the fdroid build server to set these environment variables before build?

Is there a script I can create that is executed before hand, so I can gather those environment variables?

Thanks,

Stefan

The build server? Yes… $$VERSION$$ and $$VERCODE$$

But… we can’t (yet) do this dynamically on checkupdate, so no AutoUpdate possible

Ah, I think I could do it with prebuild: or init: and set those that I need.

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.