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: VERSION = $(shell git describe --tags)
-git pull BUILDTIME = $(shell date +%Y.%m.%d)
echo "build it!"
GO111MODULE=off go build -v -x all: build
./powerpaneld --hostname=breen ./powerpaneld --hostname=breen
# su -c "setcap 'cap_net_bind_service=+ep' go.wit.com" # su -c "setcap 'cap_net_bind_service=+ep' go.wit.com"
run: build:
GO111MODULE=off go build -v -x 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 -systemctl stop powerpaneld.service
./powerpaneld ./powerpaneld