Files
flipper/scripts/publish-android-snapshot.sh
Pascal Hartig 474a36c0e2 Set up automatic release publishing (#266)
Summary:
On tags, build and publish artifacts to bintray. The encrypted accounted creds are for a `flipperfbbot` account on Bintray I created for this.
Pull Request resolved: https://github.com/facebook/flipper/pull/266

Reviewed By: priteshrnandgaonkar

Differential Revision: D9848181

Pulled By: passy

fbshipit-source-id: cf9150b2352a9ce972c48533ce15e8e75aa908fe
2018-09-17 01:57:48 -07:00

17 lines
638 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 "Build appears to be a SNAPSHOT release, but this is a script for building stable releases. Skipping ..."
exit 1
else
openssl aes-256-cbc -d -in scripts/bintray-publish-keys.enc -k "$ANDROID_PUBLISH_KEY" >> "$BASEDIR/gradle.properties"
"$BASEDIR"/gradlew bintrayUpload --info -PdryRun=false
fi