Skip to content

Commit

Permalink
Release version 1.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalbe4 authored and eyalbe4 committed Nov 15, 2016
1 parent d01ffa8 commit 1ceb24f
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 70 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
currentVersion=1.7.2
currentVersion=1.7.3
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ class GradleBintrayPluginSpec extends Specification {

def cleanupSpec() {
if (savedVersion) {
if (bintray.currentSubject().repository(config.repo)
if (bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).version(savedVersion).exists()) {
bintray.currentSubject().repository(config.repo)
bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).version(savedVersion).delete()
}
}

boolean pkgExists = bintray.currentSubject().repository(config.repo)
boolean pkgExists = bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).exists()

if (pkgExists) {
// Delete the package:
bintray.currentSubject().repository(config.repo)
bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).delete()
}
}
Expand All @@ -66,16 +66,16 @@ class GradleBintrayPluginSpec extends Specification {
exitCode == 0

// Package was created:
bintray.currentSubject().repository(config.repo)
bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).exists()

// Version was created:
bintray.currentSubject().repository(config.repo)
bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).version(version).exists()

when:
// Get the created package:
Pkg pkg = bintray.currentSubject().repository(config.repo)
Pkg pkg = bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).get()

then:
Expand All @@ -95,16 +95,16 @@ class GradleBintrayPluginSpec extends Specification {
exitCode == 0

// Package was created:
bintray.currentSubject().repository(config.repo)
bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).exists()

// Version was created:
bintray.currentSubject().repository(config.repo)
bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).version(version).exists()

when:
// Get the created package:
Pkg pkg = bintray.currentSubject().repository(config.repo)
Pkg pkg = bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).get()

then:
Expand All @@ -125,16 +125,16 @@ class GradleBintrayPluginSpec extends Specification {
exitCode == 0

// Package was created:
bintray.currentSubject().repository(config.repo)
bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).exists()

// Version was created:
bintray.currentSubject().repository(config.repo)
bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).version(version).exists()

when:
// Get the created package:
Pkg pkg = bintray.currentSubject().repository(config.repo)
Pkg pkg = bintray.subject(config.bintrayOrg).repository(config.repo)
.pkg(config.pkgName).get()

then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class PluginSpecUtils {
.addEnvVar("bintrayApiUrl", config.url)
.addEnvVar("bintrayUser", config.bintrayUser)
.addEnvVar("bintrayKey", config.bintrayKey)
.addEnvVar("bintrayOrg", config.bintrayOrg)
.addEnvVar("repoName", config.repo)
.addEnvVar("pkgName", config.pkgName)
.addEnvVar("pkgDesc", config.pkgDesc)
Expand Down
71 changes: 18 additions & 53 deletions src/test/groovy/com/jfrog/bintray/gradle/TestsConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,59 +16,13 @@ class TestsConfig {
private TestsConfig() {
config = new ConfigSlurper().parse(this.class.getResource('/gradle/config.groovy')).conf

def bintrayUser = getenv('BINTRAY_USER')
if (!bintrayUser) {
bintrayUser = System.getProperty('bintrayUser')
}
if (!bintrayUser) {
throwMissingConfProp('Bintray user name', 'BINTRAY_USER', 'bintrayUser')
}
config.bintrayUser = bintrayUser

def bintrayKey = getenv('BINTRAY_KEY')
if (!bintrayKey) {
bintrayKey = System.getProperty('bintrayKey')
}
if (!bintrayKey) {
throwMissingConfProp('Bintray API key', 'BINTRAY_KEY', 'bintrayKey')
}
config.bintrayKey = bintrayKey

def bintrayAdminUser = getenv('BINTRAY_ADMIN_USER')
if (!bintrayAdminUser) {
bintrayAdminUser = System.getProperty('bintrayAdminUser')
}
if (!bintrayAdminUser) {
throwMissingConfProp('Bintray admin user name (used for linking the package to JCenter)', 'BINTRAY_ADMIN_USER', 'bintrayAdminUser')
}
config.bintrayAdminUser = bintrayAdminUser

def bintrayAdminKey = getenv('BINTRAY_ADMIN_KEY')
if (!bintrayAdminKey) {
bintrayAdminKey = System.getProperty('bintrayAdminKey')
}
if (!bintrayAdminKey) {
throwMissingConfProp('Bintray admin API key (used for linking the package to JCenter)', 'BINTRAY_ADMIN_KEY', 'bintrayAdminKey')
}
config.bintrayAdminKey = bintrayAdminKey

def mavenCentralUser = getenv('MAVEN_CENTRAL_USER')
if (!mavenCentralUser) {
mavenCentralUser = System.getProperty('mavenCentralUser')
}
if (!mavenCentralUser) {
throwMissingConfProp('Maven Central user', 'MAVEN_CENTRAL_USER', 'mavenCentralUser')
}
config.mavenCentralUser = mavenCentralUser

def mavenCentralPassword = getenv('MAVEN_CENTRAL_PASSWORD')
if (!mavenCentralPassword) {
mavenCentralPassword = System.getProperty('mavenCentralPassword')
}
if (!mavenCentralPassword) {
throwMissingConfProp('Maven Central password', 'MAVEN_CENTRAL_PASSWORD', 'mavenCentralPassword')
}
config.mavenCentralPassword = mavenCentralPassword
config.bintrayUser = readValue('Bintray user name', 'BINTRAY_USER', 'bintrayUser')
config.bintrayKey = readValue('Bintray API key', 'BINTRAY_KEY', 'bintrayKey')
config.bintrayOrg = readValue('Bintray organization', 'BINTRAY_ORG', 'bintrayOrg')
config.bintrayAdminUser = readValue('Bintray admin user name (used for linking the package to JCenter)', 'BINTRAY_ADMIN_USER', 'bintrayAdminUser')
config.bintrayAdminKey = readValue('Bintray admin API key (used for linking the package to JCenter)', 'BINTRAY_ADMIN_KEY', 'bintrayAdminKey')
config.mavenCentralUser = readValue('Maven Central user', 'MAVEN_CENTRAL_USER', 'mavenCentralUser')
config.mavenCentralPassword = readValue('Maven Central password', 'MAVEN_CENTRAL_PASSWORD', 'mavenCentralPassword')

def bintrayApiUrl = getenv('BINTRAY_API_URL')
if (!bintrayApiUrl) {
Expand All @@ -92,6 +46,17 @@ class TestsConfig {
}
}

private String readValue(String displayName, String envVarName, String sysPropName) {
String value = getenv(envVarName)
if (!value) {
value = System.getProperty(sysPropName)
}
if (!value) {
throwMissingConfProp(displayName, envVarName, sysPropName)
}
value
}

private throwMissingConfProp(String name, String envVarName, String sysPropName) {
throw new Exception("The ${name} was not configured. Please set it using the '${envVarName}' environment variable or the '${sysPropName}' system property.")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bintray {
pkg {
repo = repoName
name = pkgName
userOrg = bintrayOrg
desc = pkgDesc
labels = pkgLabels
licenses = ['Apache-2.0']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ bintray {
pkg {
repo = repoName
name = pkgName
userOrg = bintrayOrg
desc = pkgDesc
labels = pkgLabels
licenses = ['Apache-2.0']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bintray {
pkg {
repo = repoName
name = pkgName
userOrg = bintrayOrg
desc = pkgDesc
labels = pkgLabels
licenses = ['Apache-2.0']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bintray {
pkg {
repo = repoName
name = pkgName
userOrg = bintrayOrg
vcsUrl = 'https://github.com/bintray/gradle-bintray-plugin.git'
version {
name = versionName
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/gradle/buildFiles/override.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ bintray {
pkg {
repo = repoName
name = pkgName
userOrg = bintrayOrg
desc = pkgDesc
vcsUrl = 'https://github.com/bintray/gradle-bintray-plugin.git'
licenses = ['Apache-2.0']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8-SNAPSHOT"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3-SNAPSHOT"
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/gradle/projects/fileSpec/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8-SNAPSHOT"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3-SNAPSHOT"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8-SNAPSHOT"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3-SNAPSHOT"
}
}

Expand Down

0 comments on commit 1ceb24f

Please sign in to comment.