1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-07-31 03:59:07 +02:00

Remove the obsolete gradle scripts

This commit is contained in:
Alex Plate 2024-01-31 18:09:56 +02:00
parent 880efb012a
commit e5f5dc56c9
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F
6 changed files with 0 additions and 173 deletions

View File

@ -63,11 +63,6 @@ object ReleaseEap : IdeaVimBuildType({
gradle {
tasks = "publishPlugin"
}
// Same as the script below. However, jgit can't find ssh keys on TeamCity
// gradle {
// name = "Push changes to the repo"
// tasks = "scripts:pushChanges"
// }
script {
name = "Push changes to the repo"
scriptContent = """

View File

@ -89,10 +89,6 @@ sealed class ReleasePlugin(private val releaseType: String) : IdeaVimBuildType({
name = "Add release tag"
tasks = "scripts:addReleaseTag"
}
// gradle {
// name = "Reset release branch"
// tasks = "scripts:resetReleaseBranch"
// }
script {
name = "Reset release branch"
//language=Shell Script
@ -123,10 +119,6 @@ sealed class ReleasePlugin(private val releaseType: String) : IdeaVimBuildType({
name = "Publish release"
tasks = "publishPlugin"
}
// gradle {
// name = "Push changes to the repo"
// tasks = "scripts:pushChangesWithReleaseBranch"
// }
script {
name = "Push changes to the repo"
scriptContent = """

View File

@ -93,25 +93,6 @@ tasks.register("addReleaseTag", JavaExec::class) {
args = listOf(project.version.toString(), rootProject.rootDir.toString(), releaseType ?: "")
}
tasks.register("resetReleaseBranch", JavaExec::class) {
group = "release"
mainClass.set("scripts.release.ResetReleaseBranchKt")
classpath = sourceSets["main"].runtimeClasspath
args = listOf(project.version.toString(), rootProject.rootDir.toString(), releaseType ?: "")
}
tasks.register("pushChanges", JavaExec::class) {
mainClass.set("scripts.PushChangesKt")
classpath = sourceSets["main"].runtimeClasspath
args = listOf(rootProject.rootDir.toString())
}
tasks.register("pushChangesWithReleaseBranch", JavaExec::class) {
mainClass.set("scripts.PushChangesWithReleaseBranchKt")
classpath = sourceSets["main"].runtimeClasspath
args = listOf(rootProject.rootDir.toString(), releaseType ?: "")
}
tasks.register("selectBranch", JavaExec::class) {
group = "release"
mainClass.set("scripts.release.SelectBranchKt")

View File

@ -1,37 +0,0 @@
/*
* Copyright 2003-2023 The IdeaVim authors
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE.txt file or at
* https://opensource.org/licenses/MIT.
*/
package scripts
import scripts.release.checkoutBranch
import scripts.release.withGit
import scripts.release.withRepo
fun main(args: Array<String>) {
val rootDir = args[0]
println("root dir: $rootDir")
val currentBranch = withRepo(rootDir) { it.branch }
println("Current branch is $currentBranch")
withGit(rootDir) { git ->
if (currentBranch != "master") {
git.checkoutBranch("master")
println("Check out master branch")
}
git.push()
.setPushTags()
.call()
println("Master pushed with tags")
git.checkoutBranch(currentBranch)
println("Checked out $currentBranch branch")
}
}

View File

@ -1,54 +0,0 @@
/*
* Copyright 2003-2023 The IdeaVim authors
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE.txt file or at
* https://opensource.org/licenses/MIT.
*/
package scripts
import scripts.release.checkoutBranch
import scripts.release.withGit
import scripts.release.withRepo
fun main(args: Array<String>) {
val rootDir = args[0]
val releaseType = args[1]
println("root dir: $rootDir")
println("releaseType: $releaseType")
val currentBranch = withRepo(rootDir) { it.branch }
println("Current branch is $currentBranch")
withGit(rootDir) { git ->
if (currentBranch != "master") {
git.checkoutBranch("master")
println("Check out master branch")
}
git.push()
.setPushTags()
.call()
println("Master pushed with tags")
if (releaseType != "patch") {
git.checkoutBranch("release")
println("Checked out release")
git
.push()
.setForce(true)
.setPushTags()
.call()
println("Pushed release branch with tags")
}
else {
println("Do not push release branch because type of release is $releaseType")
}
git.checkoutBranch(currentBranch)
println("Checked out $currentBranch branch")
}
}

View File

@ -1,50 +0,0 @@
/*
* Copyright 2003-2023 The IdeaVim authors
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE.txt file or at
* https://opensource.org/licenses/MIT.
*/
package scripts.release
fun main(args: Array<String>) {
val (_, rootDir, releaseType) = readArgs(args)
checkReleaseType(releaseType)
checkBranch(rootDir, releaseType)
if (releaseType == "patch") {
println("Skip release branch reset because release type is 'patch'")
return
}
withGit(rootDir) { git ->
val currentCommits = git.log().setMaxCount(3).call()
println("Last three commits:")
for (currentCommit in currentCommits) {
println(currentCommit.id.name)
}
val currentCommit = git.log().setMaxCount(1).call().first()
git.checkoutBranch("release")
println("Checked out release branch")
git.reset()
.setRef(currentCommit.id.name)
.call()
println("release branch reset")
val getCurrentCommit = git.log().setMaxCount(1).call().first()
println("Release branch is on $getCurrentCommit")
git.checkoutBranch("master")
println("Checked out master branch")
val currentCommitAgain = git.log().setMaxCount(1).call().first()
println("Current commit: $currentCommitAgain")
}
checkBranch(rootDir, releaseType)
}