-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into release/2.1.1
- Loading branch information
Showing
3 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# Required env vars: | ||
# TRAVIS_TAG: current tag (e.g. v0.1.2) | ||
# BINTRAY_USER, BINTRAY_KEY | ||
|
||
# Run locally: | ||
# TRAVIS_TAG=v0.1.2 BINTRAY_USER=username BINTRAY_KEY=fjkhsdfka3289r82rkfe ./travis-push-to-bintray.sh | ||
|
||
|
||
DRY_RUN=false | ||
|
||
# Only allow tags | ||
if [ -z "$TRAVIS_TAG" ]; then | ||
echo "Not a Travis tag build; will perform a dry-run." | ||
TRAVIS_TAG=v0.0.0 | ||
DRY_RUN=true | ||
fi | ||
|
||
# Strip the "v" prefix | ||
TAG_VERSION_NAME=${TRAVIS_TAG:1} | ||
|
||
# Only allow proper "digits.digits.digits" versions. | ||
if [[ ! $TAG_VERSION_NAME =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
echo "Not a proper version string; will perform a dry-run." | ||
DRY_RUN=true | ||
fi | ||
|
||
# Check that defined library version matches the tag. | ||
if ! grep -q "ext.dtglibVersion = '$TAG_VERSION_NAME'" version.gradle | ||
then | ||
echo "Library version name in build.gradle does not match tag name; will perform a dry-run." | ||
DRY_RUN=true | ||
fi | ||
|
||
|
||
# Assuming a successful playkit:build, create javadoc jar, sources jar, pom | ||
./gradlew dtglib:publishMavenPublicationToMavenLocal -x mavenAndroidJavadocs | ||
|
||
# Upload | ||
./gradlew dtglib:bintrayUpload -PdryRun=$DRY_RUN -PbintrayUser=$BINTRAY_USER -PbintrayKey=$BINTRAY_KEY |