mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-14 17:17:07 +02:00
[TC] Create branch when checkout
This commit is contained in:
scripts/src/main/kotlin/scripts
@@ -21,7 +21,9 @@ fun main(args: Array<String>) {
|
||||
val git = getGit(rootDir)
|
||||
|
||||
if (currentBranch != "master") {
|
||||
git.checkout().setName("master").call()
|
||||
git.checkout()
|
||||
.setCreateBranch(true)
|
||||
.setName("master").call()
|
||||
println("Check out master branch")
|
||||
}
|
||||
|
||||
@@ -31,6 +33,7 @@ fun main(args: Array<String>) {
|
||||
println("Master pushed with tags")
|
||||
|
||||
git.checkout()
|
||||
.setCreateBranch(true)
|
||||
.setName("release")
|
||||
.call()
|
||||
println("Checked out release")
|
||||
@@ -43,6 +46,7 @@ fun main(args: Array<String>) {
|
||||
println("Pushed release branch with tags")
|
||||
|
||||
git.checkout()
|
||||
.setCreateBranch(true)
|
||||
.setName(currentBranch)
|
||||
.call()
|
||||
println("Checked out $currentBranch branch")
|
||||
|
@@ -26,6 +26,7 @@ fun main(args: Array<String>) {
|
||||
println("Current commit id: ${currentCommit.id.name}")
|
||||
|
||||
git.checkout()
|
||||
.setCreateBranch(true)
|
||||
.setName("release")
|
||||
.call()
|
||||
println("Checked out release branch")
|
||||
@@ -36,6 +37,7 @@ fun main(args: Array<String>) {
|
||||
println("release branch reset")
|
||||
|
||||
git.checkout()
|
||||
.setCreateBranch(true)
|
||||
.setName("master")
|
||||
.call()
|
||||
println("Checked out master branch")
|
||||
|
@@ -21,7 +21,7 @@ fun main(args: Array<String>) {
|
||||
else -> error("Unsupported release type: $releaseType")
|
||||
}
|
||||
|
||||
git.checkout().setName(branchName).call()
|
||||
git.checkout().setCreateBranch(true).setName(branchName).call()
|
||||
|
||||
val currentBranch = getRepo(rootDir).branch
|
||||
check(currentBranch == branchName) {
|
||||
|
Reference in New Issue
Block a user