Added detailed about versioning

This commit is contained in:
s1lentq 2016-04-24 13:18:47 +06:00
parent 9fd5eaa043
commit 641fe3c102
2 changed files with 14 additions and 2 deletions

View File

@ -40,6 +40,11 @@ class GitVersioner {
return null;
}
static String prepareUrlToCommits(String url) {
if (url == null) {
// default remote url
return "https://github.com/s1lentq/ReGameDLL_CS/commit/";
}
StringBuilder sb = new StringBuilder();
String childPath;
int pos = url.indexOf('@');
@ -73,8 +78,15 @@ class GitVersioner {
def commitDate = new DateTime(1000L * commit.commitTime, DateTimeZone.UTC)
String remote_name = cfg.getString("branch", branch, "remote");
String url = cfg.getString("remote", remote_name, "url");
println 'Debug: Start';
println ' cfg: (' + cfg + ')';
println ' branch: (' + branch + ')';
println ' remote_name: (' + remote_name + ')';
println ' url: (' + url + ')';
println 'Debug: End';
String urlCommits = prepareUrlToCommits(url);
if (!commit) {

View File

@ -371,6 +371,6 @@ task generateAppVersion {
renderedFile.delete()
renderedFile.write(content, 'utf-8')
println 'The current ReGameDLL version is ' + verInfo.asVersion().toString() + ', maven version is ' + verInfo.asMavenVersion().toString() + ', commit id: ' + verInfo.commitID.toString() + ', commit author: ' + verInfo.authorCommit.toString();
println 'The current ReGameDLL version is ' + verInfo.asVersion().toString() + ', maven version is ' + verInfo.asMavenVersion().toString() + ', commit id: ' + verInfo.commitID.toString() + ', commit author: ' + verInfo.authorCommit.toString() + ', url: (' + verInfo.urlCommits.toString() + ')';
}
}