mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-29 08:05:46 +03:00
Improved parse remote url
This commit is contained in:
parent
641fe3c102
commit
ae653c00fc
@ -77,8 +77,21 @@ class GitVersioner {
|
|||||||
def branch = repo.getBranch()
|
def branch = repo.getBranch()
|
||||||
def commitDate = new DateTime(1000L * commit.commitTime, DateTimeZone.UTC)
|
def commitDate = new DateTime(1000L * commit.commitTime, DateTimeZone.UTC)
|
||||||
|
|
||||||
|
String url = null;
|
||||||
String remote_name = cfg.getString("branch", branch, "remote");
|
String remote_name = cfg.getString("branch", branch, "remote");
|
||||||
String url = cfg.getString("remote", remote_name, "url");
|
|
||||||
|
if (remote_name == null) {
|
||||||
|
for (String remotes : cfg.getSubsections("remote")) {
|
||||||
|
if (url != null) {
|
||||||
|
println 'Found a second remote: (' + remotes + '), url: (' + cfg.getString("remote", remotes, "url") + ')'
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
url = cfg.getString("remote", remotes, "url");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
url = cfg.getString("remote", remote_name, "url");
|
||||||
|
}
|
||||||
|
|
||||||
println 'Debug: Start';
|
println 'Debug: Start';
|
||||||
println ' cfg: (' + cfg + ')';
|
println ' cfg: (' + cfg + ')';
|
||||||
|
Loading…
Reference in New Issue
Block a user