2024-10-30 02:28:53 -05:00
|
|
|
VERSION = $(shell git describe --tags)
|
2024-11-16 00:08:43 -06:00
|
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
2024-10-30 02:28:53 -05:00
|
|
|
|
|
|
|
all: build
|
|
|
|
./virtigoctl --version
|
|
|
|
./virtigoctl --help
|
2024-10-30 09:14:20 -05:00
|
|
|
make dump-droplets
|
2024-10-30 02:28:53 -05:00
|
|
|
|
|
|
|
build:
|
2024-11-16 00:08:43 -06:00
|
|
|
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}"
|
2024-10-30 02:28:53 -05:00
|
|
|
|
2024-11-16 00:08:43 -06:00
|
|
|
install:
|
|
|
|
GO111MODULE=off go install \
|
|
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
2024-10-30 02:28:53 -05:00
|
|
|
|
|
|
|
# autofixes your import headers in your golang files
|
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
|
|
|
|
|
|
|
# remake the go.mod and go.sum files
|
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f go.*
|
|
|
|
rm -f virtigo*
|
|
|
|
|
2024-10-30 09:14:20 -05:00
|
|
|
dump-uptime:
|
|
|
|
./virtigoctl dump --uptime=true
|
|
|
|
|
2024-10-30 07:52:44 -05:00
|
|
|
dump-droplets:
|
|
|
|
./virtigoctl dump --droplets=true
|
|
|
|
|
|
|
|
dump-droplets-full:
|
2024-10-30 09:14:20 -05:00
|
|
|
./virtigoctl dump --droplets-full=true
|
|
|
|
|
|
|
|
dump-hypervisors:
|
|
|
|
./virtigoctl dump --hypervisors=true
|
2024-10-30 07:52:44 -05:00
|
|
|
|
|
|
|
start:
|
|
|
|
./virtigoctl --start www.wit.com go.wit.com
|
2024-10-30 09:14:20 -05:00
|
|
|
|
2024-11-13 18:53:56 -06:00
|
|
|
create-from-nagios-filename:
|
2024-10-30 09:14:20 -05:00
|
|
|
./virtigoctl create --filename=/home/nfs1/node004/kvm/nagios.lab.wit.org.qcow2
|