|
@@ -37,6 +37,35 @@ allprojects {
|
|
|
|
|
|
ignoreFailures = true
|
|
ignoreFailures = true
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ ext {
|
|
|
|
+ releaseChangelog = {
|
|
|
|
+ def dateFormat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm")
|
|
|
|
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"))
|
|
|
|
+ def branch
|
|
|
|
+ if (System.env.BRANCH_NAME) {
|
|
|
|
+ branch = System.env.BRANCH_NAME
|
|
|
|
+ branch = branch.substring(branch.lastIndexOf("/") + 1)
|
|
|
|
+ } else {
|
|
|
|
+ branch = "git rev-parse --abbrev-ref HEAD".execute().in.text.trim()
|
|
|
|
+ }
|
|
|
|
+ if (branch == "HEAD") {
|
|
|
|
+ branch = "git rev-parse --short HEAD".execute().in.text.trim()
|
|
|
|
+ }
|
|
|
|
+ def time = dateFormat.format(new Date())
|
|
|
|
+ def changes = new StringBuilder()
|
|
|
|
+ changes << "<h2>Architectury v$project.version for $project.supported_version</h2>Updated at <b>$time</b>.<br><a href=\"https://www.github.com/architectury/architectury/commits/$branch\">Click here for changelog</a>"
|
|
|
|
+ def proc = "git log --max-count=200 --pretty=format:%s".execute()
|
|
|
|
+ proc.in.eachLine { line ->
|
|
|
|
+ def processedLine = line.toString()
|
|
|
|
+ if (!processedLine.contains("New translations") && !processedLine.contains("Merge") && !processedLine.contains("branch")) {
|
|
|
|
+ changes << "<br>- ${processedLine.capitalize()}"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ proc.waitFor()
|
|
|
|
+ return changes.toString()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
task licenseFormatAll
|
|
task licenseFormatAll
|
|
@@ -58,35 +87,4 @@ bintray {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-def releaseChangelog = "No changelog"
|
|
|
|
-task curseforgePublish {
|
|
|
|
- def dateFormat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm")
|
|
|
|
- dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"))
|
|
|
|
- def branch
|
|
|
|
- if (System.env.BRANCH_NAME) {
|
|
|
|
- branch = System.env.BRANCH_NAME
|
|
|
|
- branch = branch.substring(branch.lastIndexOf("/") + 1)
|
|
|
|
- } else {
|
|
|
|
- branch = "git rev-parse --abbrev-ref HEAD".execute().in.text.trim()
|
|
|
|
- }
|
|
|
|
- if (branch == "HEAD") {
|
|
|
|
- branch = "git rev-parse --short HEAD".execute().in.text.trim()
|
|
|
|
- }
|
|
|
|
- def time = dateFormat.format(new Date())
|
|
|
|
- def changes = new StringBuilder()
|
|
|
|
- changes << "<h2>Architectury v$project.version for $project.supported_version</h2>Updated at <b>$time</b>.<br><a href=\"https://www.github.com/architectury/architectury/commits/$branch\">Click here for changelog</a>"
|
|
|
|
- def proc = "git log --max-count=200 --pretty=format:%s".execute()
|
|
|
|
- proc.in.eachLine { line ->
|
|
|
|
- def processedLine = line.toString()
|
|
|
|
- if (!processedLine.contains("New translations") && !processedLine.contains("Merge") && !processedLine.contains("branch")) {
|
|
|
|
- changes << "<br>- ${processedLine.capitalize()}"
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- proc.waitFor()
|
|
|
|
- releaseChangelog = changes.toString()
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-afterEvaluate {
|
|
|
|
-// curseforgePublish.dependsOn project("fabric").tasks.getByName("curseforge")
|
|
|
|
-// curseforgePublish.dependsOn project("forge").tasks.getByName("curseforge")
|
|
|
|
-}
|
|
|
|
|
|
+task curseforgePublish
|