Pin the docker:cli source to 29.9.3 plus its manifest list digest, tag the image as git.eeqj.de/sneak/ipabusedb-docker-reporter with the date and latest, add a push target, and rename the remaining ipabusedb-docker-ssh references in the README and package doc.
33 lines
565 B
Makefile
33 lines
565 B
Makefile
BIN := ipabusedb-docker-reporter
|
|
IMAGE := git.eeqj.de/sneak/$(BIN)
|
|
TAG := $(shell date -u +%Y-%m-%d)
|
|
|
|
.PHONY: build test lint fmt fmt-check check clean image push
|
|
|
|
build:
|
|
go build -o $(BIN) .
|
|
|
|
image:
|
|
docker build -t $(BIN) -t $(IMAGE):$(TAG) -t $(IMAGE):latest .
|
|
|
|
push: image
|
|
docker push $(IMAGE):$(TAG)
|
|
docker push $(IMAGE):latest
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
fmt:
|
|
gofmt -w *.go
|
|
|
|
fmt-check:
|
|
@test -z "$$(gofmt -l .)" || { gofmt -l .; echo "gofmt: files need formatting"; exit 1; }
|
|
|
|
lint: fmt-check
|
|
go vet ./...
|
|
|
|
check: lint test build
|
|
|
|
clean:
|
|
rm -f $(BIN) *.csv
|