Skip to content

Commit 71ffa80

Browse files
committed
Use tabpane shortcodes for platform-specific install commands
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
1 parent cf519a4 commit 71ffa80

1 file changed

Lines changed: 83 additions & 16 deletions

File tree

documentation/content/en/installation/kpt-cli.md

Lines changed: 83 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,104 @@ Users can get kpt CLI in a variety of ways:
66

77
Download pre-compiled binaries:
88

9-
- [Linux (amd64)][linux-amd64]
10-
- [Linux (arm64)][linux-arm64]
11-
- [MacOS (amd64)][darwin-amd64]
12-
- [MacOS (arm64)][darwin-arm64]
9+
{{< tabpane text=true >}}
10+
{{% tab header="Linux amd64" %}}
11+
```shell
12+
curl -LO https://github.com/kptdev/kpt/releases/download/v{{< kpt_version >}}/kpt_linux_amd64-{{< kpt_version >}}.tar.gz
13+
```
14+
{{% /tab %}}
15+
{{% tab header="Linux arm64" %}}
16+
```shell
17+
curl -LO https://github.com/kptdev/kpt/releases/download/v{{< kpt_version >}}/kpt_linux_arm64-{{< kpt_version >}}.tar.gz
18+
```
19+
{{% /tab %}}
20+
{{% tab header="macOS amd64" %}}
21+
```shell
22+
curl -LO https://github.com/kptdev/kpt/releases/download/v{{< kpt_version >}}/kpt_darwin_amd64-{{< kpt_version >}}.tar.gz
23+
```
24+
{{% /tab %}}
25+
{{% tab header="macOS arm64" %}}
26+
```shell
27+
curl -LO https://github.com/kptdev/kpt/releases/download/v{{< kpt_version >}}/kpt_darwin_arm64-{{< kpt_version >}}.tar.gz
28+
```
29+
{{% /tab %}}
30+
{{< /tabpane >}}
1331

1432
Optionally verify the [SLSA3 signatures](https://slsa.dev/) generated using the OpenSSF's
1533
[slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) during the release
1634
process. To verify a release archive:
1735

1836
1. Install the verification tool from [slsa-framework/slsa-verifier#installation](https://github.com/slsa-framework/slsa-verifier#installation).
19-
2. Download the signature file `multiple.intoto.jsonl` from the [GitHub releases page](https://github.com/kptdev/kpt/releases).
37+
2. Download the signature file:
38+
39+
```shell
40+
curl -LO https://github.com/kptdev/kpt/releases/download/v{{< kpt_version >}}/multiple.intoto.jsonl
41+
```
2042
3. Run the verifier:
2143

44+
{{< tabpane text=true >}}
45+
{{% tab header="Linux amd64" %}}
46+
```shell
47+
slsa-verifier verify-artifact \
48+
--provenance-path multiple.intoto.jsonl \
49+
--source-uri github.com/kptdev/kpt \
50+
--source-versioned-tag v{{< kpt_version >}} \
51+
kpt_linux_amd64-{{< kpt_version >}}.tar.gz
52+
```
53+
{{% /tab %}}
54+
{{% tab header="Linux arm64" %}}
55+
```shell
56+
slsa-verifier verify-artifact \
57+
--provenance-path multiple.intoto.jsonl \
58+
--source-uri github.com/kptdev/kpt \
59+
--source-versioned-tag v{{< kpt_version >}} \
60+
kpt_linux_arm64-{{< kpt_version >}}.tar.gz
61+
```
62+
{{% /tab %}}
63+
{{% tab header="macOS amd64" %}}
2264
```shell
23-
slsa-verifier verify-artifact --provenance-path multiple.intoto.jsonl --source-uri github.com/kptdev/kpt --source-versioned-tag <the-tag> kpt_<os>_<arch>-<version>.tar.gz
65+
slsa-verifier verify-artifact \
66+
--provenance-path multiple.intoto.jsonl \
67+
--source-uri github.com/kptdev/kpt \
68+
--source-versioned-tag v{{< kpt_version >}} \
69+
kpt_darwin_amd64-{{< kpt_version >}}.tar.gz
2470
```
71+
{{% /tab %}}
72+
{{% tab header="macOS arm64" %}}
73+
```shell
74+
slsa-verifier verify-artifact \
75+
--provenance-path multiple.intoto.jsonl \
76+
--source-uri github.com/kptdev/kpt \
77+
--source-versioned-tag v{{< kpt_version >}} \
78+
kpt_darwin_arm64-{{< kpt_version >}}.tar.gz
79+
```
80+
{{% /tab %}}
81+
{{< /tabpane >}}
2582

2683
After downloading (and optionally verifying), extract the archive:
2784

85+
{{< tabpane text=true >}}
86+
{{% tab header="Linux amd64" %}}
87+
```shell
88+
tar -xzf kpt_linux_amd64-{{< kpt_version >}}.tar.gz
89+
```
90+
{{% /tab %}}
91+
{{% tab header="Linux arm64" %}}
92+
```shell
93+
tar -xzf kpt_linux_arm64-{{< kpt_version >}}.tar.gz
94+
```
95+
{{% /tab %}}
96+
{{% tab header="macOS amd64" %}}
2897
```shell
29-
tar -xzf kpt_<os>_<arch>-<version>.tar.gz
98+
tar -xzf kpt_darwin_amd64-{{< kpt_version >}}.tar.gz
3099
```
100+
{{% /tab %}}
101+
{{% tab header="macOS arm64" %}}
102+
```shell
103+
tar -xzf kpt_darwin_arm64-{{< kpt_version >}}.tar.gz
104+
```
105+
{{% /tab %}}
106+
{{< /tabpane >}}
31107

32108
On MacOS the first time, it may be necessary to open the program from the finder with _ctrl-click open_.
33109

@@ -166,13 +242,4 @@ kpt version
166242

167243
[ghcr.io/kptdev/kpt]: https://github.com/kptdev/kpt/pkgs/container/kpt
168244
[cloud-sdk]: https://github.com/GoogleCloudPlatform/cloud-sdk-docker
169-
170-
[linux-amd64]:
171-
https://github.com/kptdev/kpt/releases/download/v{{< kpt_version >}}/kpt_linux_amd64-{{< kpt_version >}}.tar.gz
172-
[linux-arm64]:
173-
https://github.com/kptdev/kpt/releases/download/v{{< kpt_version >}}/kpt_linux_arm64-{{< kpt_version >}}.tar.gz
174-
[darwin-amd64]:
175-
https://github.com/kptdev/kpt/releases/download/v{{< kpt_version >}}/kpt_darwin_amd64-{{< kpt_version >}}.tar.gz
176-
[darwin-arm64]:
177-
https://github.com/kptdev/kpt/releases/download/v{{< kpt_version >}}/kpt_darwin_arm64-{{< kpt_version >}}.tar.gz
178245
[bash-completion]: https://github.com/scop/bash-completion#installation

0 commit comments

Comments
 (0)