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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay