appveyor: add support for build version

native-compilation-test
Kirill Vainer 8 years ago
parent d2a4a3fa87
commit fe0360f3fc
  1. 10
      version.gradle

@ -124,7 +124,11 @@ task configureVersionInfo {
if (jmeGitTag != null) { if (jmeGitTag != null) {
jmeGitTag = jmeGitTag.name jmeGitTag = jmeGitTag.name
} else { } else {
jmeGitTag = System.env.TRAVIS_TAG if (System.env.APPVEYOR_REPO_TAG == "true") {
jmeGitTag = System.env.APPVEYOR_REPO_TAG_NAME
} else {
jmeGitTag = System.env.TRAVIS_TAG
}
} }
def releaseInfo = getReleaseInfo(jmeGitTag) def releaseInfo = getReleaseInfo(jmeGitTag)
@ -137,10 +141,14 @@ task configureVersionInfo {
jmePomVersion = jmeVersion jmePomVersion = jmeVersion
if (System.env.TRAVIS_BRANCH != null) { if (System.env.TRAVIS_BRANCH != null) {
jmeBranchName = System.env.TRAVIS_BRANCH jmeBranchName = System.env.TRAVIS_BRANCH
} else if (System.env.APPVEYOR_REPO_BRANCH != null) {
jmeBranchName = APPVEYOR_REPO_BRANCH
} }
if (System.env.TRAVIS_PULL_REQUEST != null && if (System.env.TRAVIS_PULL_REQUEST != null &&
System.env.TRAVIS_PULL_REQUEST != "false") { System.env.TRAVIS_PULL_REQUEST != "false") {
jmeBranchName += "-pr-" + System.env.TRAVIS_PULL_REQUEST jmeBranchName += "-pr-" + System.env.TRAVIS_PULL_REQUEST
} else if (System.env.APPVEYOR_PULL_REQUEST_NUMBER != null) {
jmeBranchName += "-pr-" + System.env.APPVEYOR_PULL_REQUEST_NUMBER
} }
if (jmeBranchName != "master") { if (jmeBranchName != "master") {
jmeFullVersion += "-${jmeBranchName}" jmeFullVersion += "-${jmeBranchName}"

Loading…
Cancel
Save