9bf3195743
Update the project structure to move all golang files to a new `src/` folder. This keeps all the code located in the same place and easier to work with. Update the Makefile and goreleaser config to continue to work with the new folder structure.
31 lines
842 B
Makefile
31 lines
842 B
Makefile
install-deps:
|
|
cd src/ && go mod download
|
|
|
|
# Standard go test
|
|
test:
|
|
cd src/ && go test ./... -v -race
|
|
|
|
# Make sure no unnecessary dependencies are present
|
|
go-mod-tidy:
|
|
cd src/ && go mod tidy -v
|
|
git diff-index --quiet HEAD
|
|
|
|
format:
|
|
cd src/ && go fmt $(go list ./... | grep -v /vendor/)
|
|
cd src/ && 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) .
|