Skip to content

Commit

Permalink
drop manual versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Forest Fang committed Jun 1, 2016
1 parent 8169c60 commit 93a8ba5
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 44 deletions.
34 changes: 0 additions & 34 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ buildscript {
}
}

import java.text.SimpleDateFormat

def globalVersion = new Version(currentVersion)

allprojects {
apply plugin: 'java'
apply plugin: 'idea'
Expand Down Expand Up @@ -86,33 +82,3 @@ subprojects {
}
}
}

class Version {
String originalVersion
String thisVersion
String status
Date buildTime

Version(String versionValue) {
buildTime = new Date()
originalVersion = versionValue
if (originalVersion.endsWith('-SNAPSHOT')) {
status = 'integration'
thisVersion = originalVersion.substring(0, originalVersion.length() - 'SNAPSHOT'.length()) + getTimestamp()
} else {
status = 'release'
thisVersion = versionValue
}
}

String getTimestamp() {
// Convert local file timestamp to UTC
def format = new SimpleDateFormat('yyyyMMddHHmmss')
format.setCalendar(Calendar.getInstance(TimeZone.getTimeZone('UTC')));
return format.format(buildTime)
}

String toString() {
thisVersion
}
}
6 changes: 1 addition & 5 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@ bintray {
repo = 'aerosolve'
userOrg = 'airbnb'
name = 'aerosolve-core'
desc = 'Aerosolve machine learning library'
desc = 'Aerosolve machine learning library core module'
websiteUrl = 'https://github.com/airbnb/aerosolve'
issueTrackerUrl = 'https://github.com/airbnb/aerosolve/issues'
vcsUrl = 'https://github.com/airbnb/aerosolve.git'
licenses = ['Apache-2.0']
labels = ['machine learning', 'spark', 'scala']
attributes= ['plat': ['linux', 'osx']]
publicDownloadNumbers = true
version {
name = currentVersion
desc = 'Aerosolve core library'
}
}
}

Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
currentVersion=0.1.68
bintray_user=fake_user
bintray_key=fake_key
4 changes: 0 additions & 4 deletions training/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ bintray {
labels = ['machine learning', 'spark', 'scala']
attributes= ['plat': ['linux', 'osx']]
publicDownloadNumbers = true
version {
name = currentVersion
desc = 'Aerosolve training library'
}
}
}

Expand Down

0 comments on commit 93a8ba5

Please sign in to comment.