mirror of
https://github.com/ivabus/pantry
synced 2024-11-14 04:25:08 +03:00
d24d0dc3c0
* Add krew * Add runtime dependencies * remove redundant dep --------- Co-authored-by: Jacob Heider <jacob@pkgx.dev>
42 lines
932 B
YAML
42 lines
932 B
YAML
distributable:
|
|
url: git+https://github.com/kubernetes-sigs/krew
|
|
ref: v{{version}}
|
|
|
|
versions:
|
|
github: kubernetes-sigs/krew
|
|
|
|
dependencies:
|
|
git-scm.org: '*'
|
|
|
|
build:
|
|
dependencies:
|
|
go.dev: ^1.21
|
|
script: |
|
|
export KREW_ROOT=$(pwd)/.krew
|
|
export PATH=${PATH}:${KREW_ROOT}/bin
|
|
go build \
|
|
-tags netgo \
|
|
-mod readonly \
|
|
-ldflags "-w \
|
|
-X sigs.k8s.io/krew/internal/version.gitCommit=$(git rev-parse --short HEAD) \
|
|
-X sigs.k8s.io/krew/internal/version.gitTag={{version}}" \
|
|
-o "{{prefix}}/bin/kubectl-krew" \
|
|
./cmd/krew
|
|
env:
|
|
CGO_ENABLED: 0
|
|
|
|
provides:
|
|
- bin/kubectl-krew
|
|
|
|
test:
|
|
dependencies:
|
|
gnu.org/grep: '*'
|
|
kubernetes.io/kubectl: '*'
|
|
env:
|
|
KREW_ROOT: $PWD
|
|
PATH: ${KREW_ROOT}/bin:${PATH}
|
|
script: |
|
|
kubectl-krew version | grep GitTag | grep {{version}}
|
|
kubectl-krew update
|
|
kubectl-krew install ctx
|
|
kubectl-ctx
|