How can I get the build number as a environment variable? [Flutter] [iOS] #1369
-
If I do not set the flag I want to access that How can I do that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @DanielJaramillo94, Yes, you can set. It will automatically fetch
You can read more about build versioning here. |
Beta Was this translation helpful? Give feedback.
-
I managed to do it using custom environment variables.
More info about custom environment variables here. |
Beta Was this translation helpful? Give feedback.
I managed to do it using custom environment variables.
I use this pre-build script to store the
build_number
in a variable calledFLUTTER_BUILD_NUMBER
.version=$(grep -E "^version: .+\+.+" /Users/builder/clone/pubspec.yaml); buildVersion=$(echo $version | awk -F "+" '{print $2}'); echo "FLUTTER_BUILD_NUMBER=$buildVersion" >> $CM_ENV;
More info about custom environment variables here.