2017-05-11 03:39:09 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Deploy a SNAPSHOT JAR after every successful CI run To Sonatype.
|
2018-10-24 03:09:58 -07:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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.
|
2017-05-11 03:39:09 -07:00
|
|
|
#
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
|
|
|
|
IS_SNAPSHOT="$(grep 'VERSION_NAME=[0-9\.]\+-SNAPSHOT' "$BASEDIR/gradle.properties")"
|
|
|
|
|
2021-05-21 11:14:07 -07:00
|
|
|
if [ "$IS_SNAPSHOT" == "" ]; then
|
2017-05-11 03:39:09 -07:00
|
|
|
echo >&2 "Skipping build. Given build doesn't appear to be a SNAPSHOT release."
|
|
|
|
else
|
2021-05-21 11:14:07 -07:00
|
|
|
env TERMINAL=dumb "$BASEDIR/gradlew" publish
|
2017-05-11 03:39:09 -07:00
|
|
|
fi
|