Skip to content

Commit

Permalink
Config to get the bintray deploy work running. (Consensys#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
rojotek authored Jan 22, 2019
1 parent ff1f220 commit 1e839cc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ jobs:
- run:
name: Upload skinny zip file to Bintray
command: "./scripts/upload-to-bintray.sh $BINTRAY_USER $BINTRAY_KEY build/distributions/orion-$(cat build/version).zip consensys binaries orion $(cat build/version)"
- deploy:
name: Deploying snapshot to Bintray (release branches only)
command: |
if [ -z "${CIRCLE_PULL_REQUEST}" ] && echo "${CIRCLE_BRANCH}" | grep -q -E '^master$|^[0-9]+\.[0-9]+$'; then
echo "Start deployment"
BINTRAY_DEPLOY=true ./gradlew deploy
else
echo "Start dry run deployment"
./gradlew deploy
fi
workflows:
version: 2
Expand Down
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ apply plugin: 'net.ltgt.errorprone'
apply plugin: 'application'
apply plugin: 'maven-publish'
apply from: "gradle/check-licenses.gradle"
apply plugin: 'com.jfrog.bintray'

version = '0.1.0-SNAPSHOT'

Expand Down Expand Up @@ -334,7 +335,7 @@ publishing {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'Orion'
description 'A java implementation of Constellation'
description 'A java implementation of a Enterprise Ethereum Private Transaction Manager.'
url '/~https://github.com/ConsenSys/orion'
scm { url '/~https://github.com/ConsenSys/orion' }
licenses {
Expand All @@ -350,10 +351,15 @@ publishing {
}
}

task deploy() {}
deploy.dependsOn bintrayUpload

bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_KEY')
publications = ['mavenArtifact']
override = true
publish = true
pkg {
repo = "pegasys-repo"
name = "orion"
Expand Down

0 comments on commit 1e839cc

Please sign in to comment.