forked from CrunchyData/postgresql-prometheus-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
28 lines (18 loc) · 769 Bytes
/
Copy pathmakefile
File metadata and controls
28 lines (18 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
VERSION=1.1
ORGANIZATION=crunchydata
SOURCES:=$(shell find . -name '*.go' | grep -v './vendor')
TARGET:=postgresql-prometheus-adapter
.PHONY: all clean build docker-image docker-push test prepare-for-docker-build
all: $(TARGET)
build: $(TARGET)
$(TARGET): main.go $(SOURCES)
go build -ldflags="-X 'main.Version=${VERSION}'" -o $(TARGET)
container: $(TARGET) Dockerfile
@#podman rmi $(ORGANIZATION)/$(TARGET):latest $(ORGANIZATION)/$(TARGET):$(VERSION)
podman build -t $(ORGANIZATION)/$(TARGET):latest .
podman tag $(ORGANIZATION)/$(TARGET):latest $(ORGANIZATION)/$(TARGET):$(VERSION)
container-save: container
rm -f $(TARGET)-$(VERSION).tar
podman save --output=$(TARGET)-$(VERSION).tar $(ORGANIZATION)/$(TARGET):$(VERSION)
clean:
rm -f *~ $(TARGET)