Skip to content

Commit ee93be7

Browse files
authored
Merge pull request #737 from openziti/update-ziti-cli
Update ziti-cli to version 1.6.9
2 parents fc1c012 + d5dfa3e commit ee93be7

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ download = "5.6.0"
1111

1212
# OpenZiti Edge API
1313
ziti-api = "0.26.51"
14-
ziti-cli = "1.5.4"
14+
ziti-cli = "1.6.9"
1515

1616
# third party
1717
lazysodium-java = "5.2.0"

ziti/build.gradle.kts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,33 @@ kotlin {
150150

151151
val zitiVersion = libs.versions.ziti.cli.get()
152152
val binDir = layout.buildDirectory.dir("bin").get()
153+
val srcDir = layout.buildDirectory.dir("ziti-src").get()
153154
val zitiCLI = binDir.file("ziti")
154155
val quickstartHome = layout.buildDirectory.dir("quickstart").get()
155156

157+
tasks.register<Exec>("zitiCheckout") {
158+
group = LifecycleBasePlugin.BUILD_GROUP
159+
description = "checkout ziti cli source"
160+
161+
if (srcDir.asFile.exists()) {
162+
srcDir.asFile.deleteRecursively()
163+
}
164+
165+
commandLine("env", "git", "clone",
166+
"--depth", "1", "--branch", "v${zitiVersion}",
167+
"https://github.com/openziti/ziti", "${srcDir.asFile.absolutePath}"
168+
)
169+
}
170+
156171
tasks.register<Exec>("buildZiti") {
172+
dependsOn("zitiCheckout")
157173
group = LifecycleBasePlugin.BUILD_GROUP
158174
description = "Builds the Ziti CLI"
175+
workingDir(srcDir)
176+
159177
environment("GOBIN", binDir.asFile.absolutePath)
160-
commandLine("env",
161-
"go", "install", "github.com/openziti/ziti/ziti@v${zitiVersion}"
162-
)
178+
environment("GOWORK", "off")
179+
commandLine("env", "go", "install", "./ziti")
163180
outputs.file(zitiCLI)
164181
}
165182

0 commit comments

Comments
 (0)