Summary: Set up automatic publishing to Maven Snapshots if the current VERSION_NAME ends in `-SNAPSHOT`. Reviewed By: danielbuechele Differential Revision: D9539838 fbshipit-source-id: 6e413fa3b02966946bb867eebe7ba8b863f291b9
17 lines
573 B
Bash
Executable File
17 lines
573 B
Bash
Executable File
#!/usr/bin/bash
|
|
set -e
|
|
|
|
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
|
|
IS_SNAPSHOT="$(grep 'VERSION_NAME=[0-9\.]\+-SNAPSHOT' "$BASEDIR/gradle.properties")"
|
|
|
|
if [ "$ANDROID_PUBLISH_KEY" == "" ]; then
|
|
echo "No encryption key. Skipping snapshot deployment."
|
|
exit
|
|
elif [ "$IS_SNAPSHOT" == "" ]; then
|
|
echo "Skipping build. Given build doesn't appear to be a SNAPSHOT release."
|
|
exit 1
|
|
else
|
|
openssl aes-256-cbc -d -in scripts/gradle-publish-keys.enc -k "$ANDROID_PUBLISH_KEY" >> "$BASEDIR/gradle.properties"
|
|
"$BASEDIR"/gradlew uploadArchives --info
|
|
fi
|