-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dino Kovač
committed
Jul 18, 2017
1 parent
bfa1a38
commit bd5a5f2
Showing
3 changed files
with
41 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ buildscript { | |
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.novoda:bintray-release:0.5.0' | ||
} | ||
} | ||
|
||
|
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,26 @@ | ||
#!/usr/bin/env bash | ||
if [ $# -lt 3 ]; then | ||
echo "Usage: <bintray username> <bintray api key> <version> [optional tag message]" | ||
exit 1 | ||
fi | ||
|
||
username="$1" | ||
api_key="$2" | ||
version="$3" | ||
|
||
# default tag message | ||
tag_message="$version release" | ||
|
||
if [ ! -z "$4" ]; then | ||
tag_message="$4" | ||
fi | ||
|
||
./gradlew clean build generatePomFileForMavenPublication bintrayUpload -PbintrayUser=${username} -PbintrayKey=${api_key} -PdryRun=false | ||
git tag -a "${version}" -m "${tag_message}" && \ | ||
git push --tags | ||
|
||
# fix version in README.md if needed | ||
sed -E "s/'co.infinum:retrofit-converter-thrifty:[\.0-9]+'/'co.infinum:retrofit-converter-thrifty:$version'/g" README.md > tmp_readme && mv tmp_readme README.md | ||
|
||
# show changes so we know to commit if needed | ||
git status |
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