Implement cmdrun config parameter

This commit is contained in:
eleksir
2025-05-19 12:19:25 +03:00
parent 757fb5e57e
commit 32d865e24e
7 changed files with 315 additions and 15 deletions

View File

@@ -4,6 +4,7 @@ BUILDOPTS=-ldflags="-s -w" -a -gcflags=all=-l -trimpath -buildvcs=false
BINARY=i3status-go
TEST1=battery-test
TEST2=cmdrun-test
## Use calssic targets where first one is deafult target
all: clean build
@@ -16,15 +17,18 @@ battery-test:
rm -rf ${TEST1}
go build ${BUILDOPTS} -o ${TEST1} ./cmd/${TEST1}
cmdrun-test:
rm -rf ${TEST1}
go build ${BUILDOPTS} -o ${TEST2} ./cmd/${TEST2}
## Remove binary with golang compiler' means
clean:
rm -rf ${BINARY} ${TEST1}
rm -rf ${BINARY} ${TEST1} ${TEST2}
## Misc target, for development purposes. Updates vendored libs, brutal way.
upgrade:
$(RM) -r vendor
go get -u -t -tool ./...
go get -u -t ./...
go mod tidy
go mod vendor