mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-27 05:58:00 +03:00
Refactoring versioning
Add badge about version Update README.md
This commit is contained in:
parent
06d943417b
commit
faff55df78
@ -1,4 +1,4 @@
|
||||
# ReGameDLL_CS [![Build Status](http://teamcity.rehlds.org/app/rest/builds/buildType:(id:ReGameDLLCs_Publish)/statusIcon)](http://teamcity.rehlds.org/viewType.html?buildTypeId=ReGameDLLCs_Publish&guest=1)
|
||||
# ReGameDLL_CS [![Build Status](http://teamcity.rehlds.org/app/rest/builds/buildType:(id:ReGameDLLCs_Publish)/statusIcon)](http://teamcity.rehlds.org/viewType.html?buildTypeId=ReGameDLLCs_Publish&guest=1) [![Download](http://rehlds.org/version/regamedll.svg)](http://teamcity.rehlds.org/guestAuth/downloadArtifacts.html?buildTypeId=ReGameDLL_Publish&buildId=lastSuccessful)
|
||||
Reverse-engineered gamedll (mp.dll / Counter-Strike)
|
||||
|
||||
## What is this?
|
||||
|
@ -20,7 +20,7 @@ class RegamedllVersionInfo {
|
||||
String commitURL
|
||||
Integer commitCount
|
||||
|
||||
String asMavenVersion() {
|
||||
String asMavenVersion(boolean extra = true) {
|
||||
StringBuilder sb = new StringBuilder()
|
||||
sb.append(majorVersion).append('.' + minorVersion);
|
||||
if (maintenanceVersion != null) {
|
||||
@ -31,21 +31,23 @@ class RegamedllVersionInfo {
|
||||
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');
|
||||
}
|
||||
|
||||
return sb.toString()
|
||||
}
|
||||
String asCommitDate() {
|
||||
String pattern = "MMM d yyyy";
|
||||
if (commitDate.getDayOfMonth() >= 10) {
|
||||
pattern = "MMM d yyyy";
|
||||
String asCommitDate(String pattern = null) {
|
||||
if (pattern == null) {
|
||||
pattern = "MMM d yyyy";
|
||||
if (commitDate.getDayOfMonth() >= 10) {
|
||||
pattern = "MMM d yyyy";
|
||||
}
|
||||
}
|
||||
|
||||
return DateTimeFormat.forPattern(pattern).withLocale(Locale.ENGLISH).print(commitDate);
|
||||
|
@ -390,6 +390,8 @@ task generateAppVersion {
|
||||
inputs.property('version', rootProject.version)
|
||||
inputs.property('commitDate', verInfo.asCommitDate())
|
||||
|
||||
println "##teamcity[buildNumber '" + verInfo.asMavenVersion(false) + "']";
|
||||
|
||||
doLast {
|
||||
def templateCtx = [
|
||||
verInfo: verInfo
|
||||
|
Loading…
x
Reference in New Issue
Block a user