Files
flipper/scripts/publish-android-release.sh
Pascal Hartig bdbd71b399 Fix bintray upload script (#353)
Summary:
I feel like I'm having a Groundhog Day moment. Haven't I fixed this
before?

Anyway, the release script fails (very verbosely) with an NPE
(https://circleci.com/gh/facebook/flipper/467?utm_campaign=workflow-failed&utm_medium=email&utm_source=notification)
when you run it on the root project. So we need to specify the
sub-projects we want to run it on.

groundhogday

Pull Request resolved: https://github.com/facebook/flipper/pull/353

Reviewed By: priteshrnandgaonkar

Differential Revision: D13652379

Pulled By: passy

fbshipit-source-id: dd9ff26444db7b30974a041870796b679e7fee0c
2019-01-15 07:19:33 -08:00

17 lines
661 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 :android:bintrayUpload :fbjni:bintrayUpload -PdryRun=false
fi