feat: rename output binary and archives
Update the goreleaser config to rename the output binary and archive names to `fail2ban_exporter` instead of defaulting to the project name. This better aligns with conventions used by other exporters. Update Dockerfile and Makefile to follow the new naming scheme. Update the output archives to wrap the build files in a folder. This makes extracting the archives a little easier. BREAKING CHANGE: Release binary name has been changed to `fail2ban_exporter`.
This commit is contained in:
parent
cc68fe3f01
commit
3911eca07e
@ -1,10 +1,12 @@
|
|||||||
# This is an example goreleaser.yaml file with some sane defaults.
|
# This is an example goreleaser.yaml file with some sane defaults.
|
||||||
# Make sure to check the documentation at http://goreleaser.com
|
# Make sure to check the documentation at http://goreleaser.com
|
||||||
|
project_name: fail2ban_exporter
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- make go/dependencies
|
- make go/dependencies
|
||||||
builds:
|
builds:
|
||||||
-
|
-
|
||||||
|
binary: fail2ban_exporter
|
||||||
dir: src
|
dir: src
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
@ -20,6 +22,7 @@ builds:
|
|||||||
|
|
||||||
archives:
|
archives:
|
||||||
-
|
-
|
||||||
|
wrap_in_directory: true
|
||||||
files:
|
files:
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- README.md
|
- README.md
|
||||||
|
@ -18,6 +18,6 @@ FROM debian:buster-slim
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy compiled binary to release image
|
# Copy compiled binary to release image
|
||||||
COPY --from=build /build/src/exporter /app/fail2ban-prometheus-exporter
|
COPY --from=build /build/src/fail2ban_exporter /app/fail2ban_exporter
|
||||||
|
|
||||||
ENTRYPOINT ["/app/fail2ban-prometheus-exporter"]
|
ENTRYPOINT ["/app/fail2ban_exporter"]
|
||||||
|
2
Makefile
2
Makefile
@ -26,7 +26,7 @@ build/release:
|
|||||||
./tools/goreleaser_linux_amd64 --rm-dist --skip-publish
|
./tools/goreleaser_linux_amd64 --rm-dist --skip-publish
|
||||||
|
|
||||||
build/docker:
|
build/docker:
|
||||||
cd src/ && go build -o exporter \
|
cd src/ && go build -o fail2ban_exporter \
|
||||||
-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
|
-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
|
||||||
|
|
||||||
docker/build/latest:
|
docker/build/latest:
|
||||||
|
Loading…
Reference in New Issue
Block a user