DEV Community

Zahir Din
Zahir Din

Posted on

Flutter CICD android with CodeMagic

Here is pre-build script:

#!/bin/sh

curl --request GET -H "PRIVATE-TOKEN: $ACCESS_TOKEN" https://git.glsb.my/api/v4/projects/$PROJECT_ID/secure_files > secure_files.json

cat secure_files.json | jq '.[] | "\(.id),\(.name)"' | tr -d '"' > files.txt

while IFS=, read -a line;
do set -- "${line[@]}";
    curl --request GET -H "PRIVATE-TOKEN: $ACCESS_TOKEN" https://git.glsb.my/api/v4/projects/$PROJECT_ID/secure_files/$1/download > $2;
done < files.txt

mv logo.png assets/images/logo.png

flutter pub get
flutter pub run flutter_launcher_icons -f pubspec.yaml
Enter fullscreen mode Exit fullscreen mode

Top comments (0)