mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
[build] add make rule for vendor
This commit adds a Makefile rule for installing the vendor directory. Both the `build` and `docker-build` phony rules depend on the `vendor` rule, which in turn depends on the `glide.lock` rule. This means that any time the `glide.lock` file is updated, the vendor directory will be re-installed.
This commit is contained in:
parent
3618aafca4
commit
a723582f58
1 changed files with 5 additions and 2 deletions
7
Makefile
7
Makefile
|
|
@ -25,10 +25,10 @@ ifeq ($(ARCH),s390x)
|
|||
endif
|
||||
|
||||
all: docker-build
|
||||
build:
|
||||
build: vendor
|
||||
CGO_ENABLED=0 GOARCH=$(ARCH) go build -a -tags netgo -o $(OUT_DIR)/$(ARCH)/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter
|
||||
|
||||
docker-build:
|
||||
docker-build: vendor
|
||||
cp deploy/Dockerfile $(TEMP_DIR)
|
||||
cd $(TEMP_DIR) && sed -i "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile
|
||||
|
||||
|
|
@ -48,3 +48,6 @@ push: ./manifest-tool $(addprefix push-,$(ALL_ARCH))
|
|||
./manifest-tool:
|
||||
curl -sSL https://github.com/estesp/manifest-tool/releases/download/v0.5.0/manifest-tool-linux-amd64 > manifest-tool
|
||||
chmod +x manifest-tool
|
||||
|
||||
vendor: glide.lock
|
||||
glide install -v
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue