diff --git a/.github/workflows/check-manifest-generation-diff.yaml b/.github/workflows/check-manifest-generation-diff.yaml index 4bddac3..db7ab1a 100644 --- a/.github/workflows/check-manifest-generation-diff.yaml +++ b/.github/workflows/check-manifest-generation-diff.yaml @@ -12,9 +12,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Make manifests && generate - run: | - make manifests && make generate - name: Setup Go uses: actions/setup-go@v5 with: diff --git a/.gitignore b/.gitignore index d8da42d..17d2e21 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ crd-to-yaml dist/ .idea +bin cty wasm/wasm diff --git a/Makefile b/Makefile index 936c1a3..79e264e 100644 --- a/Makefile +++ b/Makefile @@ -30,14 +30,26 @@ bootstrap: ## Installs necessary third party components ##@ Testing -test: lint ## Lints Krok then runs all tests +test: lint ## Lints the project then runs all tests go test -count=1 ./... clean: ## Runs go clean go clean -i -lint: ## Runs golangci-lint on crd - golangci-lint run ./... +## Location to install dependencies to +LOCALBIN ?= $(shell pwd)/bin +$(LOCALBIN): + mkdir -p $(LOCALBIN) + +GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint +GOLANGCI_LINT_VERSION ?= v1.55.2 + +golangci-lint: $(GOLANGCI_LINT) +$(GOLANGCI_LINT): $(LOCALBIN) + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION) + +lint: golangci-lint ## Run golangci-lint. + $(GOLANGCI_LINT) run ##@ Utilities diff --git a/bin/golangci-lint b/bin/golangci-lint new file mode 100755 index 0000000..afed9c5 Binary files /dev/null and b/bin/golangci-lint differ diff --git a/go.mod b/go.mod index caf5d5f..b32cb60 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/maxence-charriere/go-app/v9 v9.8.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 - gopkg.in/yaml.v2 v2.4.0 k8s.io/apiextensions-apiserver v0.29.1 k8s.io/apimachinery v0.29.1 ) @@ -26,6 +25,7 @@ require ( golang.org/x/net v0.21.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.120.1 // indirect k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect