2021-10-17 17:39:02 +00:00
|
|
|
go/dependencies:
|
2023-06-19 17:58:16 +00:00
|
|
|
go mod download
|
2021-02-05 22:49:47 +00:00
|
|
|
|
|
|
|
# Make sure no unnecessary dependencies are present
|
2021-10-17 17:39:02 +00:00
|
|
|
go/checkDependencies:
|
2023-06-19 17:58:16 +00:00
|
|
|
go mod tidy -v
|
2021-02-05 22:49:47 +00:00
|
|
|
git diff-index --quiet HEAD
|
|
|
|
|
2021-10-17 17:39:02 +00:00
|
|
|
# Standard go test
|
|
|
|
go/test:
|
2023-06-19 17:58:16 +00:00
|
|
|
go test ./... -v -race
|
2021-10-17 17:39:02 +00:00
|
|
|
|
|
|
|
go/fmt:
|
2023-06-19 17:58:16 +00:00
|
|
|
go fmt ./...
|
2021-10-17 17:39:02 +00:00
|
|
|
|
|
|
|
go/checkFmt:
|
|
|
|
test -z $(shell gofmt -l .)
|
2021-02-07 10:46:25 +00:00
|
|
|
|
2021-02-07 13:04:24 +00:00
|
|
|
build/docker:
|
2023-06-19 17:58:16 +00:00
|
|
|
go build -o fail2ban_exporter \
|
2021-02-08 19:48:55 +00:00
|
|
|
-ldflags '-X main.version=$(shell git describe --tags) -X main.commit=${shell git rev-parse HEAD} -X "main.date=${shell date --rfc-3339=seconds}" -X main.builtBy=docker' exporter.go
|
|
|
|
|
2021-10-17 17:39:02 +00:00
|
|
|
docker/build/latest:
|
2021-02-07 13:04:24 +00:00
|
|
|
docker build -t registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:latest .
|
|
|
|
|
2022-02-12 17:31:01 +00:00
|
|
|
docker/build/nightly:
|
|
|
|
docker build -t registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:nightly .
|
|
|
|
|
2021-10-17 17:39:02 +00:00
|
|
|
docker/build/tag:
|
2021-02-07 13:04:24 +00:00
|
|
|
docker build -t registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:$(shell git describe --tags) .
|