mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-24 19:46:34 +01:00
Tweak version
This commit is contained in:
parent
3306bd2cdc
commit
f8a606c783
@ -25,12 +25,12 @@ ext {
|
||||
date = git.head().date.format("yy.MM.dd")
|
||||
revision = "-${git.head().abbreviatedId}"
|
||||
parents = git.head().parentIds;
|
||||
index = -45; // Offset to mach CI
|
||||
index = -47; // Offset to mach CI
|
||||
int major, minor, patch;
|
||||
major = minor = patch = 0;
|
||||
for (;parents != null && !parents.isEmpty();index++) {
|
||||
int majorCount, minorCount, patchCount;
|
||||
patchCount = 1;
|
||||
patchCount = minor == 0 && major == 0 ? 1 : 0;
|
||||
commit = git.getResolve().toCommit(parents.get(0));
|
||||
for (String line : commit.fullMessage.tokenize("\n")) {
|
||||
switch (line.replaceAll("- ", "").split(" ")[0].toLowerCase()) {
|
||||
@ -40,12 +40,12 @@ ext {
|
||||
case "change":
|
||||
case "changed":
|
||||
case "changes":
|
||||
if (majorCount == 0) {minorCount = 1; patch = patchCount = 0;}
|
||||
if (major == 0) {minorCount = 1; patchCount = 0;}
|
||||
break;
|
||||
case "refactor":
|
||||
case "remove":
|
||||
case "major":
|
||||
patch = minor = minorCount = patchCount = 0;
|
||||
patchCount = minorCount = 0;
|
||||
majorCount = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ processResources {
|
||||
|
||||
jar.archiveName="fawe-api-${project.parent.version}.jar"
|
||||
jar.destinationDir = file '../mvn/com/boydti/fawe-api/' + project.parent.version
|
||||
|
||||
task createPom << {
|
||||
pom {
|
||||
project {
|
||||
@ -37,4 +36,17 @@ task createPom << {
|
||||
}.writeTo("../mvn/com/boydti/fawe-api/${project.parent.version}/fawe-api-${project.parent.version}.pom")
|
||||
}
|
||||
|
||||
build.finalizedBy(createPom)
|
||||
task copyFiles {
|
||||
doLast {
|
||||
copy {
|
||||
from "../mvn/com/boydti/fawe-api/${project.parent.version}/"
|
||||
into '../mvn/com/boydti/fawe-api/latest/'
|
||||
include('*.*')
|
||||
rename ("fawe-api-${project.parent.version}.pom", 'fawe-api-latest.pom')
|
||||
rename ("fawe-api-${project.parent.version}.jar", 'fawe-api-latest.jar')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
build.finalizedBy(copyFiles)
|
||||
copyFiles.dependsOn(createPom)
|
Loading…
Reference in New Issue
Block a user