File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 go-version : v1.25.4
2626 - name : Delete non-semver tags
2727 run : ' git tag -d $(git tag -l | grep -v "^v")'
28+ - name : Set LDFLAGS
29+ run : echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV
2830 - name : Run GoReleaser on tag
2931 if : github.event_name != 'pull_request'
3032 uses : goreleaser/goreleaser-action@v3
Original file line number Diff line number Diff line change 11version : 2
2+
3+ git :
4+ tag_sort : -version:refname
5+ ignore_tags :
6+ - " cli/*"
7+ - " sdk/*"
8+
29builds :
310- id : " kubectl-bind"
411 dir : cli
512 main : ./cmd/kubectl-bind
613 binary : bin/kubectl-bind
14+ ldflags :
15+ - " {{ .Env.LDFLAGS }}"
716 goos :
817 - linux
918 - darwin
Original file line number Diff line number Diff line change @@ -482,6 +482,11 @@ helm-build-local: ## Build and package Helm charts locally for testing
482482helm-clean : # # Clean up built helm charts
483483 rm -f ./bin/* .tgz
484484
485+ .PHONY : goreleaser-test
486+ goreleaser-test : # # Test GoReleaser flow locally
487+ @command -v goreleaser > /dev/null 2>&1 || { echo " goreleaser not found. Install from: https://goreleaser.com/install/" ; exit 1; }
488+ LDFLAGS=" $( LDFLAGS) " goreleaser release --snapshot --clean
489+
485490.PHONY : helm-push-local
486491helm-push-local : # # Push Helm charts to IMAGE_REPO registry
487492 @echo " Pushing Helm charts to registry: $( IMAGE_REPO) "
Original file line number Diff line number Diff line change @@ -35,9 +35,12 @@ The `kubectl bind` plugin is the primary command-line interface for interacting
3535
3636 ```bash
3737 # Download and install for Linux/macOS
38- curl -LO https://github.com/kube-bind/kube-bind/releases/latest/download/kubectl-bind-linux-amd64
39- chmod +x kubectl-bind-linux-amd64
40- sudo mv kubectl-bind-linux-amd64 /usr/local/bin/kubectl-bind
38+ OS=$(uname | tr '[:upper:]' '[:lower:]')
39+ ARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
40+ VERSION=$(curl -s https://api.github.com/repos/kube-bind/kube-bind/releases/latest | grep '"tag_name"' | cut -d'"' -f4)
41+ curl -LO https://github.com/kube-bind/kube-bind/releases/download/${VERSION}/kubectl-bind_${VERSION#v}_${OS}_${ARCH}.tar.gz
42+ tar -xzf kubectl-bind_${VERSION#v}_${OS}_${ARCH}.tar.gz
43+ sudo mv bin/kubectl-bind /usr/local/bin/kubectl-bind
4144 ```
4245
4346## Basic Usage
You can’t perform that action at this time.
0 commit comments