From 63a037af60c8074f003cf5316c8d2d4036299a63 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Fri, 13 Jan 2017 02:38:51 +0700 Subject: [PATCH] Add badge to README.md --- README.md | 4 ++-- .../main/groovy/versioning/RehldsVersionInfo.groovy | 6 +++--- rehlds/build.gradle | 2 ++ rehlds/msvc/PreBuild.bat | 12 ++++++------ 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d5955b8..635cdcf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Rehlds +# Rehlds [![Build Status](http://teamcity.rehlds.org/app/rest/builds/buildType:(id:Rehlds_Publish)/statusIcon)](http://teamcity.rehlds.org/viewType.html?buildTypeId=Rehlds_Publish&guest=1) [![Download](http://rehlds.ru/version/rehlds/)](http://teamcity.rehlds.org/guestAuth/downloadArtifacts.html?buildTypeId=Rehlds_Publish&buildId=lastSuccessful) + Reverse-engineered (and bugfixed) HLDS -[![Build Status](http://teamcity.rehlds.org/app/rest/builds/buildType:(id:Rehlds_Publish)/statusIcon)](http://teamcity.rehlds.org/viewType.html?buildTypeId=Rehlds_Publish&guest=1) ## What is this? Rehlds is a result of reverse engineering of original HLDS (build 6152/6153) using DWARF debug info embedded into linux version of HLDS, engine_i486.so diff --git a/buildSrc/src/main/groovy/versioning/RehldsVersionInfo.groovy b/buildSrc/src/main/groovy/versioning/RehldsVersionInfo.groovy index 7b2a5c6..ae0da00 100644 --- a/buildSrc/src/main/groovy/versioning/RehldsVersionInfo.groovy +++ b/buildSrc/src/main/groovy/versioning/RehldsVersionInfo.groovy @@ -20,7 +20,7 @@ class RehldsVersionInfo { String commitURL Integer commitCount - String asMavenVersion() { + String asMavenVersion(boolean extra = true) { StringBuilder sb = new StringBuilder() sb.append(majorVersion).append('.' + minorVersion); if (maintenanceVersion != null) { @@ -31,12 +31,12 @@ class RehldsVersionInfo { sb.append('.' + commitCount) } - if (suffix) { + if (extra && suffix) { sb.append('-' + suffix) } // do mark for this build like a modified version - if (localChanges) { + if (extra && localChanges) { sb.append('+m'); } diff --git a/rehlds/build.gradle b/rehlds/build.gradle index 118d013..53f977c 100644 --- a/rehlds/build.gradle +++ b/rehlds/build.gradle @@ -400,6 +400,8 @@ task generateAppVersion { inputs.property('version', rootProject.version) inputs.property('commitDate', verInfo.asCommitDate()) + println "##teamcity[buildNumber '" + verInfo.asMavenVersion(false) + "']"; + doLast { def templateCtx = [ diff --git a/rehlds/msvc/PreBuild.bat b/rehlds/msvc/PreBuild.bat index a950c49..7d6501c 100644 --- a/rehlds/msvc/PreBuild.bat +++ b/rehlds/msvc/PreBuild.bat @@ -127,10 +127,10 @@ IF NOT %errlvl% == "1" ( ) :: append extra string - If NOT "%commitURL%"=="%commitURL:bitbucket.org=%" ( - set commitURL=!commitURL!/commit/ - ) ELSE ( + If NOT "!commitURL!"=="!commitURL:bitbucket.org=!" ( set commitURL=!commitURL!/commits/ + ) ELSE ( + set commitURL=!commitURL!/commit/ ) ) ELSE ( @@ -142,10 +142,10 @@ IF NOT %errlvl% == "1" ( set commitURL=!commitURL::=/! :: append extra string - If NOT "%commitURL%"=="%commitURL:bitbucket.org=%" ( - set commitURL=https://!commitURL!/commit/ - ) ELSE ( + If NOT "!commitURL!"=="!commitURL:bitbucket.org=!" ( set commitURL=https://!commitURL!/commits/ + ) ELSE ( + set commitURL=https://!commitURL!/commit/ ) ) )