Open chinghoi opened 8 months ago
@chinghoi although it won't allow you to reference variables inside the variables array, looking at this code: https://github.com/leanflutter/flutter_distributor/blob/main/packages/flutter_distributor/lib/src/flutter_distributor.dart#L325
It looks as though it will be pulling in the platform variables so if you just remove that one variable, it should work anyway.
However, I see in some places like here: https://github.com/leanflutter/flutter_distributor/blob/main/packages/flutter_distributor/lib/src/flutter_distributor.dart#L156
That they might get included only as a fallback, so if just removing it doesn't work perhaps there is a bug.
It will definitely pull platform variables. I've been using this config for a long time now:
#distribute_options.yaml
env:
# GOOGLE_APPLICATION_CREDENTIALS is exported by ./.keys/android/register.sh
# APPSTORE_USERNAME and APPSTORE_PASSWORD is exported by ./.keys/ios/register.sh
releases:
...
# Makefile
ios_release:
source .keys/ios/register.sh && \
flutter_distributor release --name ios --jobs ios-production
...
# register.sh
export APPSTORE_USERNAME=...
export APPSTORE_PASSWORD=...
The reason for this somewhat roundabout setup is that .keys
is a submodule with signing keys for multiple apps encrypted by git-secret. But this should work whichever way you set up the platform variables.
tl;dr: It will use your platform env variables. Only use env:
to define additional ones.
Yep, that's how I read it as well. Looking at the problem report the issue would be that $PGYER_API_KEY
becomes the value. Just remove the line completely and it should work as @cybrox says.
variables:
PGYER_API_KEY: $PGYER_API_KEY
I don't know what else needs to be configured
In terminal
$PGYER_API_KEY
is effective, likebut