Skip to content

Commit

Permalink
Fix the dependencies (#1264)
Browse files Browse the repository at this point in the history
Previous discussions #1257
  • Loading branch information
faceair authored Oct 19, 2020
1 parent cb02287 commit d7f244f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
15 changes: 15 additions & 0 deletions .ci/vgot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
if [ $# = 0 ]; then
usage: vgot cmdpackage[@version]... >&2
exit 2
fi
d=`mktemp -d`
cd "$d"
go mod init temp >/dev/null 2>&1
for i; do
pkg=`echo $i | sed 's/@.*//'`
go get "$i" &&
go install "$pkg" &&
echo installed `go list -f '{{.ImportPath}}@{{.Module.Version}}' "$pkg"`
done
rm -r "$d"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ tags
### VisualStudioCode ###
.vscode/*
.history
### Goland ###
.idea
# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
fmt.log
import.log
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ES_OPERATOR_BRANCH ?= release-4.4
ES_OPERATOR_IMAGE ?= quay.io/openshift/origin-elasticsearch-operator:4.4
SDK_VERSION=v0.18.2
GOPATH ?= "$(HOME)/go"
GOROOT ?= "$(shell go env GOROOT)"

PROMETHEUS_OPERATOR_TAG ?= v0.39.0
PROMETHEUS_BUNDLE ?= https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROMETHEUS_OPERATOR_TAG}/bundle.yaml
Expand Down Expand Up @@ -292,7 +293,7 @@ endif

.PHONY: clean
clean: undeploy-kafka undeploy-es-operator undeploy-prometheus-operator
@rm -f deploy/test/*.yaml
@rm -f deploy/test/*.yaml
@if [ -d deploy/test ]; then rmdir deploy/test ; fi
@kubectl delete -f ./test/cassandra.yml --ignore-not-found=true -n $(STORAGE_NAMESPACE) || true
@kubectl delete -f ./test/elasticsearch.yml --ignore-not-found=true -n $(STORAGE_NAMESPACE) || true
Expand All @@ -310,12 +311,12 @@ crd:
ingress:
@minikube addons enable ingress

.PHONY: generate
.PHONY: generate
generate: internal-generate format

.PHONY: internal-generate
internal-generate:
@GOPATH=${GOPATH} ./.ci/generate.sh
@GOPATH=${GOPATH} GOROOT=${GOROOT} ./.ci/generate.sh

.PHONY: test
test: unit-tests e2e-tests
Expand All @@ -337,13 +338,13 @@ install-sdk:

.PHONY: install-tools
install-tools:
@${GO_FLAGS} go install \
@${GO_FLAGS} ./.ci/vgot.sh \
golang.org/x/lint/golint \
github.com/securego/gosec/cmd/gosec \
golang.org/x/tools/cmd/goimports \
sigs.k8s.io/controller-tools/cmd/controller-gen \
k8s.io/code-generator/cmd/client-gen \
k8s.io/kube-openapi/cmd/openapi-gen
github.com/securego/gosec/cmd/[email protected] \
sigs.k8s.io/controller-tools/cmd/[email protected] \
k8s.io/code-generator/cmd/[email protected] \
k8s.io/kube-openapi/cmd/[email protected]

.PHONY: install
install: install-sdk install-tools
Expand Down

0 comments on commit d7f244f

Please sign in to comment.