fail2ban-prometheus-exporter/Makefile
Hector 9dc8dd862f build: add project dockerfile (#2)
Add a project Dockerfile to allow deploying the application in a docker
container. Add a `run.sh` script to start the application in the container.
Add Makefile commands to build the docker image based on the Dockerfile.
Fix possible nil reference error in the `db` package.
2021-02-07 13:09:02 +00:00

30 lines
787 B
Makefile

install-deps:
go mod download
# Standard go test
test:
go test ./... -v -race
# Make sure no unnecessary dependencies are present
go-mod-tidy:
go mod tidy -v
git diff-index --quiet HEAD
format:
go fmt $(go list ./... | grep -v /vendor/)
go vet $(go list ./... | grep -v /vendor/)
generateChangelog:
./tools/git-chglog_linux_amd64 --config tools/chglog/config.yml 0.0.0.. > CHANGELOG.md
build/snapshot:
./tools/goreleaser_linux_amd64 --snapshot --rm-dist --skip-publish
build/release:
./tools/goreleaser_linux_amd64 --rm-dist --skip-publish
build/docker:
docker build -t registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:latest .
build/docker-tag:
docker build -t registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter:$(shell git describe --tags) .