Skip to content

Commit

Permalink
fix cargo binary
Browse files Browse the repository at this point in the history
  • Loading branch information
goenning committed Sep 13, 2024
1 parent 238b4e0 commit a17d47e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
bin_name: kubectl-config_doctor
asset_name: kubectl-config-doctor-linux-amd64.tar.gz
- os: windows-latest
target: x86_64-pc-windows-msvc
bin_name: kubectl-config_doctor.exe
asset_name: kubectl-config-doctor-windows-amd64.zip
- os: macos-latest
target: aarch64-apple-darwin
bin_name: kubectl-config_doctor
asset_name: kubectl-config-doctor-darwin-arm64.tar.gz
- os: macos-latest
target: x86_64-apple-darwin
bin_name: kubectl-config_doctor
asset_name: kubectl-config-doctor-darwin-amd64.tar.gz

steps:
Expand All @@ -46,12 +42,14 @@ jobs:
- name: Create tar.gz archive (Linux/macOS)
if: runner.os != 'Windows'
run: |
tar -czvf ${{ matrix.asset_name }} -C target/${{ matrix.target }}/release ${{ matrix.bin_name }}
cp target/${{ matrix.target }}/release/kubectl-config-doctor kubectl-config_doctor
tar -czvf ${{ matrix.asset_name }} -C kubectl-config_doctor
- name: Create zip archive (Windows)
if: runner.os == 'Windows'
run: |
Compress-Archive -Path target/${{ matrix.target }}/release/${{ matrix.bin_name }} -DestinationPath ${{ matrix.asset_name }}
Rename-Item -Path target/${{ matrix.target }}/release/kubectl-config-doctor.exe -NewName "kubectl-config_doctor.exe"
Compress-Archive -Path kubectl-config_doctor.exe -DestinationPath ${{ matrix.asset_name }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "kubectl-config-doctor"
authors = ["Guilherme Oenning <[email protected]>"]
description = "Kubectl plugin to validate kubeconfigs"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
keywords = ["kubectl"]
license = "MIT"
Expand All @@ -17,7 +17,7 @@ include = [
]

[[bin]]
name = "kubectl-config_doctor"
name = "kubectl-config-doctor"
path = "src/main.rs"

[dependencies]
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ A `kubectl` plugin to validate and test kubeconfigs.

## 💻 Install

`kubectl-config-doctor` can be installed using [Krew](https://github.com/kubernetes-sigs/krew):
### Via [Krew](https://github.com/kubernetes-sigs/krew) (Recommended):

```shell
$ kubectl krew install config-doctor
```

### Via [Cargo](https://doc.rust-lang.org/stable/cargo/):

```shell
$ cargo install kubectl-config-doctor
```

## 📝 Intro

If you're having issues connecting to a Kubernetes cluster, there's a good chance that the problem lies in your kubeconfig file.
Expand Down

0 comments on commit a17d47e

Please sign in to comment.