mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 02:15:06 +03:00
Add kubebuilder
This commit is contained in:
parent
3f5f7ad521
commit
2221652623
1 changed files with 37 additions and 0 deletions
37
projects/kubebuilder.io/package.yml
Normal file
37
projects/kubebuilder.io/package.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/kubernetes-sigs/kubebuilder/archive/refs/tags/v{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: kubernetes-sigs/kubebuilder
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
go.dev: ^1.21
|
||||||
|
gnu.org/coreutils: '*'
|
||||||
|
script: |
|
||||||
|
go build -ldflags="$LDFLAGS" -o $BUILDLOC ./cmd
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
LDFLAGS:
|
||||||
|
- -X main.kubeBuilderVersion={{version}}
|
||||||
|
- -X main.goos=$(go env GOOS)
|
||||||
|
- -X main.goarch=$(go env GOARCH)
|
||||||
|
- -X main.gitCommit=pkgx
|
||||||
|
- -X main.buildDate=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||||
|
BUILDLOC: '{{prefix}}/bin/kubebuilder'
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/kubebuilder
|
||||||
|
|
||||||
|
test:
|
||||||
|
dependencies:
|
||||||
|
gnu.org/grep: '*'
|
||||||
|
go.dev: ^1.21
|
||||||
|
script: |
|
||||||
|
kubebuilder version | grep 'KubeBuilderVersion:"{{version}}"'
|
||||||
|
mkdir test
|
||||||
|
cd test
|
||||||
|
go mod init example.com
|
||||||
|
kubebuilder init --plugins go/v4 --project-version 3 --skip-go-version-check
|
||||||
|
go clean --modcache
|
Loading…
Reference in a new issue