From a17d47efe2ff01d0b5e9c8801d50862ab0ff2e87 Mon Sep 17 00:00:00 2001 From: goenning Date: Fri, 13 Sep 2024 13:48:20 +0100 Subject: [PATCH] fix cargo binary --- .github/workflows/release.yml | 10 ++++------ Cargo.lock | 2 +- Cargo.toml | 4 ++-- README.md | 8 +++++++- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7705640..1ebd4b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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 diff --git a/Cargo.lock b/Cargo.lock index 2819b93..1f2fcd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -727,7 +727,7 @@ dependencies = [ [[package]] name = "kubectl-config-doctor" -version = "0.3.0" +version = "0.3.1" dependencies = [ "aws-lc-rs", "colored", diff --git a/Cargo.toml b/Cargo.toml index 73759a4..e0c918b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "kubectl-config-doctor" authors = ["Guilherme Oenning "] description = "Kubectl plugin to validate kubeconfigs" -version = "0.3.0" +version = "0.3.1" edition = "2021" keywords = ["kubectl"] license = "MIT" @@ -17,7 +17,7 @@ include = [ ] [[bin]] -name = "kubectl-config_doctor" +name = "kubectl-config-doctor" path = "src/main.rs" [dependencies] diff --git a/README.md b/README.md index 14f2baa..feccf65 100644 --- a/README.md +++ b/README.md @@ -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.