Files
flipper/scripts/publish-android-release.sh
Pascal Hartig cfb4f52359 Automatically release noop packages
Summary: This is used by the public Circle CI release task.

Reviewed By: jknoxville

Differential Revision: D15149586

fbshipit-source-id: de631f930649fdbe582d525874ac6a6bf1fd4bad
2019-05-01 08:38:23 -07:00

21 lines
858 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the LICENSE file
# in the root directory of this source tree.
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 :noop:bintrayUpload -PdryRun=false
fi