2024-11-16 00:08:57 -06:00
|
|
|
.PHONY: build
|
2024-10-11 22:39:19 -05:00
|
|
|
|
2024-11-16 00:08:57 -06:00
|
|
|
VERSION = $(shell git describe --tags)
|
|
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
2024-10-11 22:39:19 -05:00
|
|
|
|
2024-11-16 00:08:57 -06:00
|
|
|
all: build
|
2024-10-11 22:39:19 -05:00
|
|
|
./virtigod --version
|
|
|
|
|
2024-11-16 00:08:57 -06:00
|
|
|
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}"
|
2024-10-11 17:22:31 -05:00
|
|
|
|
2024-10-11 22:28:08 -05:00
|
|
|
# makes a .deb package
|
|
|
|
debian:
|
2024-11-16 00:08:57 -06:00
|
|
|
go-deb --auto --repo go.wit.com/lib/daemons/virtigod
|
2024-10-11 22:28:08 -05:00
|
|
|
|
2024-10-11 17:22:31 -05:00
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
|
|
|
|
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f go.*
|
2024-10-11 22:28:08 -05:00
|
|
|
rm -f virtigod
|
|
|
|
|
|
|
|
# git clone the sources and all the golang dependancies into ~/go/src
|
|
|
|
# if you don't have go-clone, you can get it from http://go.wit.com/
|
|
|
|
git-clone:
|
|
|
|
# go-clone --recursive --go-src --no-work go.wit.com/apps/go-clone
|
|
|
|
go-clone --recursive --go-src --no-work go.wit.com/lib/daemons/virtigod
|
2024-10-26 10:34:04 -05:00
|
|
|
|
2024-10-26 19:34:32 -05:00
|
|
|
start-pihole.wit.com-http:
|
|
|
|
curl --silent http://localhost:8080/start?start=pihole.wit.com
|
2024-10-26 20:09:33 -05:00
|
|
|
|
|
|
|
start-bind.wit.com-http:
|
|
|
|
curl --silent http://localhost:8080/start?start=bind.wit.com
|