fix build

This commit is contained in:
Jeff Carr 2024-11-16 00:08:25 -06:00
parent f45c2ed21e
commit d496fac6bf
1 changed files with 17 additions and 6 deletions

View File

@ -1,12 +1,23 @@
all:
-git pull
echo "build it!"
GO111MODULE=off go build -v -x
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
all: build
./powerpaneld --hostname=breen
# su -c "setcap 'cap_net_bind_service=+ep' go.wit.com"
run:
GO111MODULE=off go build -v -x
build:
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
verbose:
GO111MODULE=off go build -v -x \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
install:
GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
run: build
-systemctl stop powerpaneld.service
./powerpaneld