Skip to content

Commit

Permalink
modifed script
Browse files Browse the repository at this point in the history
  • Loading branch information
laxmikantbpandhare committed Aug 29, 2022
1 parent 1a09787 commit 87f863f
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,9 @@ install:
go install -ldflags='-X "github.com/operator-framework/operator-manifest-tools/cmd.Version=dev" -X "github.com/operator-framework/operator-manifest-tools/cmd.Commit=dev" -X "github.com/operator-framework/operator-manifest-tools/cmd.Date=$(shell date +"%Y-%m-%dT%H:%M:%S%z")"'

GINKGO=$(PROJECT_DIR)/bin/ginkgo
LOCALBIN=$(PROJECT_DIR)/bin
ginkgo:
$(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/ginkgo)
GOBIN=$(LOCALBIN) go install github.com/onsi/ginkgo/ginkgo@latest

goreleaser:
@[ -f $(which goreleaser) ] || go install github.com/goreleaser/goreleaser@latest

# go-get-tool will 'go get' any package $2 and install it to $1.
define go-get-tool
@[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo $(1) ;\
GOBIN=$(PROJECT_DIR)/bin go get -u $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef

0 comments on commit 87f863f

Please sign in to comment.