mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 10:35:42 +01:00
Use master branch in patch dirs (#450)
use `master` as a branch name instead of `Yatopia-api` or `Yatopia-server` in `Yatopia-API` and `Yatopia-Server` respectively.
This commit is contained in:
parent
679a88af3f
commit
16ba48ea61
@ -87,8 +87,10 @@ internal fun Project.createApplyPatchesTask(
|
||||
|
||||
if (applyPatches(patchDir, upstream.name, name, wasGitSigningEnabled, projectDir)) continue
|
||||
}
|
||||
project.gitCmd("branch", "-D", "$forkName-$folder", dir = projectDir)
|
||||
project.gitCmd("checkout", "-b", "$forkName-$folder", dir = projectDir)
|
||||
// project.gitCmd("branch", "-D", "$forkName-$folder", dir = projectDir)
|
||||
// project.gitCmd("checkout", "-b", "$forkName-$folder", dir = projectDir)
|
||||
project.gitCmd("branch", "-D", "master", dir = projectDir)
|
||||
project.gitCmd("checkout", "-b", "master", dir = projectDir)
|
||||
val patchDir = patchesDir.toPath()
|
||||
// Apply patches
|
||||
if (applyPatches(patchDir, forkName, name, wasGitSigningEnabled, projectDir)) continue
|
||||
|
@ -19,7 +19,8 @@ internal fun Project.createFixBranchesTask(
|
||||
doLast {
|
||||
for (folder in folderArray) {
|
||||
val subprojectWorkDir = Paths.get("${toothpick.forkName}-${if (folder == "api") {"API"} else {"Server"}}").toFile()
|
||||
val currentBranchCommits = gitCmd("--no-pager", "log", "${toothpick.forkName}-$folder...${toothpick.upstreamBranch}", "--pretty=oneline",
|
||||
// val currentBranchCommits = gitCmd("--no-pager", "log", "${toothpick.forkName}-$folder...${toothpick.upstreamBranch}", "--pretty=oneline",
|
||||
val currentBranchCommits = gitCmd("--no-pager", "log", "master...${toothpick.upstreamBranch}", "--pretty=oneline",
|
||||
dir = subprojectWorkDir).output.toString()
|
||||
val nameMap = ConcurrentHashMap<String, String>()
|
||||
for (upstream in upstreams) {
|
||||
@ -46,7 +47,8 @@ internal fun Project.createFixBranchesTask(
|
||||
ensureSuccess(gitCmd("reset", "--hard", nameMap.get(branchName) as String, dir = subprojectWorkDir,
|
||||
printOut = true))
|
||||
}
|
||||
ensureSuccess(gitCmd("checkout", "${toothpick.forkName}-$folder", dir = subprojectWorkDir,
|
||||
// ensureSuccess(gitCmd("checkout", "${toothpick.forkName}-$folder", dir = subprojectWorkDir,
|
||||
ensureSuccess(gitCmd("checkout", "master", dir = subprojectWorkDir,
|
||||
printOut = true))
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,8 @@ internal fun Project.createRebuildPatchesTask(
|
||||
updatePatches(patchPath, upstream.name, folder, projectDir, previousUpstreamName)
|
||||
previousUpstreamName = "${upstream.name}-$folder"
|
||||
}
|
||||
ensureSuccess(gitCmd("checkout", "$forkName-$folder", dir = projectDir,
|
||||
// ensureSuccess(gitCmd("checkout", "$forkName-$folder", dir = projectDir,
|
||||
ensureSuccess(gitCmd("checkout", "master", dir = projectDir,
|
||||
printOut = true))
|
||||
|
||||
updatePatches(patchesDir, toothpick.forkName, folder, projectDir, previousUpstreamName)
|
||||
@ -59,10 +60,17 @@ private fun Project.updatePatches(
|
||||
?.forEach { it -> it.delete() }
|
||||
|
||||
ensureSuccess(
|
||||
gitCmd(
|
||||
"checkout", "$name-$folder", dir = projectDir,
|
||||
printOut = true
|
||||
)
|
||||
if (name != "Yatopia") {
|
||||
gitCmd(
|
||||
"checkout", "$name-$folder", dir = projectDir,
|
||||
printOut = true
|
||||
)
|
||||
} else {
|
||||
gitCmd(
|
||||
"checkout", "master", dir = projectDir,
|
||||
printOut = true
|
||||
)
|
||||
}
|
||||
)
|
||||
ensureSuccess(
|
||||
gitCmd(
|
||||
|
Loading…
Reference in New Issue
Block a user