add a version subcommand

fix #63
This commit is contained in:
ppom
2023-12-31 12:00:00 +01:00
parent b834e02755
commit f6f26f283e
3 changed files with 21 additions and 4 deletions

View File

@ -7,7 +7,7 @@ ip46tables: ip46tables.d/ip46tables.c
gcc -static ip46tables.d/ip46tables.c -o ip46tables
reaction: app/* reaction.go go.mod go.sum
CGO_ENABLED=0 go build -buildvcs=false .
CGO_ENABLED=0 go build -buildvcs=false -ldflags "-X main.version=`git tag --sort=v:refname | tail -n1` -X main.commit=`git rev-parse --short HEAD`"
reaction.deb: reaction ip46tables
chmod +x reaction ip46tables