Skip to content

Commit

Permalink
Update HMCL version
Browse files Browse the repository at this point in the history
  • Loading branch information
evilwk committed Jul 12, 2016
1 parent 07b757b commit f715367
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ deploy:
- HMCSM/build/libs/HMCSM-${HMCSM_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}.jar
- HMCSM/build/libs/HMCSM-${HMCSM_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}.exe
- HMCSM/build/libs/HMCSM-${HMCSM_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}-MacOSApp.zip
skip_cleanup: true
on:
repo: mclauncher/HMCL
branch: master
tags: true
skip_cleanup: true
install: echo "skip 'gradle assemble' step"
script: gradle build --continue
before_cache:
Expand Down
11 changes: 5 additions & 6 deletions HMCL/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def readBuildNumber() {

if (versionPropsFile.canRead()) {
versionProps.load(new FileInputStream(versionPropsFile))
def code = versionProps['VERSION_CODE'].toInteger() + 1

def code = versionProps['VERSION_CODE'].toInteger()
return code.toString()
} else {
versionPropsFile.createNewFile()
Expand All @@ -66,10 +65,10 @@ def readBuildNumber() {
def branches = json.getAsJsonArray('branches')
if (branches != null && branches.size() > 0) {
def info = branches.get(0).getAsJsonObject()
def code = info.get('number').getAsInt()
versionProps['VERSION_CODE'] = code.toString()
def code = info.get('number').getAsInt().toString()
versionProps['VERSION_CODE'] = code
versionProps.store(versionPropsFile.newWriter(), null)
return (code + 1).toString()
return code
}
}
}
Expand All @@ -88,7 +87,7 @@ if (buildnumber == null)

def versionroot = System.getenv("VERSION_ROOT")
if (versionroot == null)
versionroot = "2.5.0"
versionroot = "2.5.1"

String mavenGroupId = 'HMCL'
String mavenVersion = versionroot + '.' + buildnumber
Expand Down

0 comments on commit f715367

Please sign in to comment.