mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
krew (#3882)
* Add krew * Add runtime dependencies * remove redundant dep --------- Co-authored-by: Jacob Heider <jacob@pkgx.dev>
This commit is contained in:
parent
bc67c75290
commit
d24d0dc3c0
1 changed files with 42 additions and 0 deletions
42
projects/krew.sigs.k8s.io/package.yml
Normal file
42
projects/krew.sigs.k8s.io/package.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
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
|
Loading…
Reference in a new issue