Skip to content

Commit

Permalink
Add deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
Dino Kovač committed Jul 18, 2017
1 parent bfa1a38 commit bd5a5f2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.novoda:bintray-release:0.5.0'
}
}

Expand Down
26 changes: 26 additions & 0 deletions deploy.sh
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
15 changes: 14 additions & 1 deletion retrofit-converter-thrifty/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apply plugin: 'java'
apply plugin: 'com.novoda.bintray-release'

sourceCompatibility = 1.7
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

group 'co.infinum'
version '0.9.0'
Expand All @@ -20,4 +22,15 @@ dependencies {
testCompile 'org.assertj:assertj-core:3.8.0'
testCompile 'junit:junit:4.12'
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
}

publish {
userOrg = 'infinum'
groupId = project.group
artifactId = 'retrofit-converter-thrifty'
publishVersion = project.version
desc = 'Retrofit converter for Thrifty implementation of Apache Thrift'
website = 'https://github.com/infinum/thrifty-retrofit-converter'
licences = ['Apache-2.0']
repoName = 'android'
}

0 comments on commit bd5a5f2

Please sign in to comment.