CI/CD – All about AppCenter (2)

How to run a custom script before building?

  • Create appcenter-pre-build.sh
#!/usr/bin/env bash
# Creates an .env from ENV variables for use with react-native-config
cp .env.production .env

printf "\n.env created with contents:\n"
cat .env

How to fix Android build?

Make sure release build config is turned off in code

  • android/app/build.gradle
signingConfigs {
    debug {
        ...
    }

    // There is no release config here!!!
}

buildTypes {
    debug {
        ...
    }
    release {
        // Make sure this points to debug config
        signingConfig signingConfigs.debug
    }

Be the first to comment

Leave a Reply

Your email address will not be published.


*