Files
flipper/scripts/publish-android-snapshot.sh
Pascal Hartig 5aa14626f8 Make build scripts less verbose (#274)
Summary:
`--info` was only useful while debugging the initial setup. This also
makes skipping non-snapshot builds no longer fatal.
Pull Request resolved: https://github.com/facebook/flipper/pull/274

Reviewed By: jknoxville

Differential Revision: D9934199

Pulled By: passy

fbshipit-source-id: 051cdacc63a2480f7670d714aaf8ef7d0df11df7
2018-09-19 05:12:09 -07:00

17 lines
589 B
Bash
Executable File

#!/usr/bin/env bash
set -e
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
IS_SNAPSHOT="$(grep 'VERSION_NAME=[0-9\.]\+-SNAPSHOT' "$BASEDIR/gradle.properties" || echo "")"
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 --quiet
fi