mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Better CurseForge task configuration: display name, game versions and a fix for changelog backup not being replaced
This commit is contained in:
parent
d3e6e22600
commit
e94548ed0c
15
build.gradle
15
build.gradle
@ -1,5 +1,8 @@
|
|||||||
|
import org.gradle.plugins.ide.eclipse.model.internal.FileReferenceFactory
|
||||||
|
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
|
import java.nio.file.StandardCopyOption
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
@ -53,7 +56,7 @@ eclipse.classpath.file.whenMerged { cp ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create file reference factory
|
// Create file reference factory
|
||||||
def fileref = new org.gradle.plugins.ide.eclipse.model.internal.FileReferenceFactory()
|
def fileref = new FileReferenceFactory()
|
||||||
|
|
||||||
// Find all codechicken development jars
|
// Find all codechicken development jars
|
||||||
cp.entries.findAll { entry -> entry.path.contains("codechicken") && entry.path.endsWith("-dev.jar") }.forEach { entry ->
|
cp.entries.findAll { entry -> entry.path.contains("codechicken") && entry.path.endsWith("-dev.jar") }.forEach { entry ->
|
||||||
@ -132,12 +135,20 @@ if(Files.exists(Paths.get("curseforge.properties"))) {
|
|||||||
projectId = cfprops.project_id
|
projectId = cfprops.project_id
|
||||||
releaseType = "release"
|
releaseType = "release"
|
||||||
|
|
||||||
|
displayName = "Hbm's Nuclear Tech Mod " + version_name.replace("_", "") + " for Minecraft 1.7.10"
|
||||||
|
|
||||||
|
gameVersions.addAll([
|
||||||
|
"Forge",
|
||||||
|
"Java 8",
|
||||||
|
"Client", "Server"
|
||||||
|
])
|
||||||
|
|
||||||
if (Files.exists(Paths.get("changelog"))) {
|
if (Files.exists(Paths.get("changelog"))) {
|
||||||
changelog = String.join("\r\n", Files.readAllLines(Paths.get("changelog")))
|
changelog = String.join("\r\n", Files.readAllLines(Paths.get("changelog")))
|
||||||
|
|
||||||
// Perform a backup of the changelog and create a new file for next changes
|
// Perform a backup of the changelog and create a new file for next changes
|
||||||
doLast {
|
doLast {
|
||||||
Files.move(Paths.get("changelog"), Paths.get("changelog.bak"))
|
Files.move(Paths.get("changelog"), Paths.get("changelog.bak"), StandardCopyOption.REPLACE_EXISTING)
|
||||||
Files.createFile(Paths.get("changelog"))
|
Files.createFile(Paths.get("changelog"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user