Update build.gradle to not append the branch name if it matches the minecraft version.
This commit is contained in:
parent
3e6099055e
commit
5eeda79234
1 changed files with 6 additions and 3 deletions
|
@ -352,7 +352,7 @@ String getVersionFromJava(File file)
|
||||||
String branch = null;
|
String branch = null;
|
||||||
if (!System.getenv().containsKey("GIT_BRANCH"))
|
if (!System.getenv().containsKey("GIT_BRANCH"))
|
||||||
{
|
{
|
||||||
// TODO: use grgit
|
// TODO: use grgit - Tried to switch 07/07/16 - jgit broken on windows?
|
||||||
branch = "git rev-parse --abbrev-ref HEAD".execute().text.trim()
|
branch = "git rev-parse --abbrev-ref HEAD".execute().text.trim()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -363,8 +363,11 @@ String getVersionFromJava(File file)
|
||||||
|
|
||||||
def out = "${minecraft.version.replace('-', '_')}-$major.$minor.$revision.$build"
|
def out = "${minecraft.version.replace('-', '_')}-$major.$minor.$revision.$build"
|
||||||
|
|
||||||
if (branch && branch != 'master' && branch != 'HEAD')
|
if (branch && branch != 'master' && branch != 'HEAD' && branch != minecraft.version && branch != minecraft.version + '.0')
|
||||||
out += "-$branch"
|
{
|
||||||
|
if (!(branch.endsWith('.x') && minecraft.version.startsWith(branch.substring(0, branch.length() -1))))
|
||||||
|
out += "-$branch"
|
||||||
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue