Last active
June 22, 2021 19:32
-
-
Save felipefpx/26e52f4149737ab825d89e851ad434e7 to your computer and use it in GitHub Desktop.
projectSetup.sh for CircleCI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function prepareRequiredInfo { | |
GRADLE_PROPERTIES=$HOME"/code/gradle.properties" | |
export GRADLE_PROPERTIES | |
KEY_STORE_PATH=$HOME"/code/.misc/ead_keystore.jks" | |
export KEY_STORE_PATH | |
find $HOME -name "gradle.properties.sample" -exec printf "Found sample file: %s\n" {} \; | |
echo "Gradle Properties should exist at $GRADLE_PROPERTIES" | |
if [ ! -f "$GRADLE_PROPERTIES" ]; then | |
echo "Gradle Properties does not exist" | |
echo "Creating Gradle Properties file..." | |
touch $GRADLE_PROPERTIES | |
# echo "Writing gradle config to gradle.properties..." | |
echo "kotlin.compiler.execution.strategy=\"in-process\"" >> $GRADLE_PROPERTIES | |
echo "org.gradle.daemon=false" >> $GRADLE_PROPERTIES | |
echo "org.gradle.configureondemand=false" >> $GRADLE_PROPERTIES | |
echo "org.gradle.parallel=false" >> $GRADLE_PROPERTIES | |
echo "kotlin.incremental=false" >> $GRADLE_PROPERTIES | |
echo "Writing variables to gradle.properties..." | |
echo "KEY_STORE_PATH=$KEY_STORE_PATH" >> $GRADLE_PROPERTIES | |
echo "KEY_STORE_PASSWORD=$KEY_STORE_PASSWORD" >> $GRADLE_PROPERTIES | |
echo "KEY_ALIAS=$KEY_ALIAS" >> $GRADLE_PROPERTIES | |
echo "KEY_PASSWORD=$KEY_PASSWORD" >> $GRADLE_PROPERTIES | |
fi | |
# use curl to download a keystore from $KEYSTORE_URL | |
echo "KeyStore should exist at $KEY_STORE_PATH" | |
mkdir $HOME"/code/.misc" -p | |
if [ ! -f "$KEY_STORE_PATH" ]; then | |
echo "Downloading keystore..." | |
touch $KEY_STORE_PATH | |
curl -L -o $KEY_STORE_PATH $KEYSTORE_URL | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment