From e12c04cc4d7c0f1f5cc372bb4a0c626db0d47312 Mon Sep 17 00:00:00 2001 From: Peefy Date: Thu, 24 Oct 2024 19:24:58 +0800 Subject: [PATCH] chore: update example codes Signed-off-by: Peefy --- docs/user_docs/guides/package-management/3-quick-start.md | 4 ++-- examples/kubernetes/from-kubernetes/kcl.mod | 2 +- examples/kubernetes/generate-manifests/my-module/kcl.mod | 2 +- .../kubernetes/generate-manifests/my-module/kcl.mod.lock | 8 ++------ examples/kubevela/kcl-play-svc/kcl.mod | 2 +- examples/kubevela/kcl-play-svc/kcl.mod.lock | 8 ++------ examples/package-management/oci/my_package/kcl.mod | 2 +- examples/package-management/oci/my_package/kcl.mod.lock | 4 ++-- .../user_docs/guides/package-management/3-quick-start.md | 4 ++-- 9 files changed, 14 insertions(+), 22 deletions(-) diff --git a/docs/user_docs/guides/package-management/3-quick-start.md b/docs/user_docs/guides/package-management/3-quick-start.md index f12fc515..fa8b7300 100644 --- a/docs/user_docs/guides/package-management/3-quick-start.md +++ b/docs/user_docs/guides/package-management/3-quick-start.md @@ -39,7 +39,7 @@ You can then add a dependency to the current kcl package using the `kcl mod add` As shown below, taking the example of adding a package dependency named `k8s`, the version of the package is `1.28`. ```shell -kcl mod add k8s:1.28 +kcl mod add k8s:1.28.1 ``` You can see that `kcl` adds the dependency you just added to kcl.mod. @@ -51,7 +51,7 @@ edition = "0.0.1" version = "0.0.1" [dependencies] -k8s = "1.28" # The dependency 'k8s' with version '1.28' +k8s = "1.28.1" # The dependency 'k8s' with version '1.28.1' ``` ### Write a kcl program that uses the content in `k8s` diff --git a/examples/kubernetes/from-kubernetes/kcl.mod b/examples/kubernetes/from-kubernetes/kcl.mod index a1aafca8..709407e6 100644 --- a/examples/kubernetes/from-kubernetes/kcl.mod +++ b/examples/kubernetes/from-kubernetes/kcl.mod @@ -4,4 +4,4 @@ edition = "v0.10.0" version = "0.0.1" [dependencies] -crd = { path = "./models" } \ No newline at end of file +crd = { path = "./models" } diff --git a/examples/kubernetes/generate-manifests/my-module/kcl.mod b/examples/kubernetes/generate-manifests/my-module/kcl.mod index a70ae8b2..6c9046fd 100644 --- a/examples/kubernetes/generate-manifests/my-module/kcl.mod +++ b/examples/kubernetes/generate-manifests/my-module/kcl.mod @@ -4,4 +4,4 @@ edition = "0.0.1" version = "0.0.1" [dependencies] -k8s = "1.28" +k8s = "1.28.1" diff --git a/examples/kubernetes/generate-manifests/my-module/kcl.mod.lock b/examples/kubernetes/generate-manifests/my-module/kcl.mod.lock index 8c61a23b..560b962a 100644 --- a/examples/kubernetes/generate-manifests/my-module/kcl.mod.lock +++ b/examples/kubernetes/generate-manifests/my-module/kcl.mod.lock @@ -1,9 +1,5 @@ [dependencies] [dependencies.k8s] name = "k8s" - full_name = "k8s_1.28" - version = "1.28" - sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q=" - reg = "ghcr.io" - repo = "kcl-lang/k8s" - oci_tag = "1.28" + full_name = "k8s_1.28.1" + version = "1.28.1" diff --git a/examples/kubevela/kcl-play-svc/kcl.mod b/examples/kubevela/kcl-play-svc/kcl.mod index 71da9a4c..2ce46abb 100644 --- a/examples/kubevela/kcl-play-svc/kcl.mod +++ b/examples/kubevela/kcl-play-svc/kcl.mod @@ -5,4 +5,4 @@ version = "0.0.1" [dependencies] oam = "0.1.0" -k8s = "1.28" +k8s = "1.28.1" diff --git a/examples/kubevela/kcl-play-svc/kcl.mod.lock b/examples/kubevela/kcl-play-svc/kcl.mod.lock index 1a6f60ed..89b97790 100644 --- a/examples/kubevela/kcl-play-svc/kcl.mod.lock +++ b/examples/kubevela/kcl-play-svc/kcl.mod.lock @@ -1,12 +1,8 @@ [dependencies] [dependencies.k8s] name = "k8s" - full_name = "k8s_1.28" - version = "1.28" - sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q=" - reg = "ghcr.io" - repo = "kcl-lang/k8s" - oci_tag = "1.28" + full_name = "k8s_1.28.1" + version = "1.28.1" [dependencies.oam] name = "oam" full_name = "oam_0.1.0" diff --git a/examples/package-management/oci/my_package/kcl.mod b/examples/package-management/oci/my_package/kcl.mod index f969b9fe..3add1c87 100644 --- a/examples/package-management/oci/my_package/kcl.mod +++ b/examples/package-management/oci/my_package/kcl.mod @@ -4,4 +4,4 @@ edition = "0.0.1" version = "0.0.1" [dependencies] -k8s = "1.28" \ No newline at end of file +k8s = "1.28.1" diff --git a/examples/package-management/oci/my_package/kcl.mod.lock b/examples/package-management/oci/my_package/kcl.mod.lock index e9b8686e..560b962a 100644 --- a/examples/package-management/oci/my_package/kcl.mod.lock +++ b/examples/package-management/oci/my_package/kcl.mod.lock @@ -1,5 +1,5 @@ [dependencies] [dependencies.k8s] name = "k8s" - full_name = "k8s_1.28" - version = "1.28" + full_name = "k8s_1.28.1" + version = "1.28.1" diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/3-quick-start.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/3-quick-start.md index 0dd2b7db..d3008c1e 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/3-quick-start.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/3-quick-start.md @@ -39,7 +39,7 @@ version = "0.0.1" 如下面的命令所示,为当前包添加一个版本号为 `1.28` 并且名为 `k8s` 的依赖包。 ```shell -kcl mod add k8s:1.28 +kcl mod add k8s:1.28.1 ``` `kcl` 会为您将依赖添加到 kcl.mod 文件中. @@ -51,7 +51,7 @@ edition = "0.0.1" version = "0.0.1" [dependencies] -k8s = "1.28" # The dependency 'k8s' with version '1.28' +k8s = "1.28.1" # The dependency 'k8s' with version '1.28.1' ``` ## 编写一个程序使用包 `konfig` 中的内容