virtigoctl/Makefile

52 lines
1.2 KiB
Makefile

VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
all: build
./virtigoctl --version
./virtigoctl --help
make dump-droplets
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}"
# 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*
dump-uptime:
./virtigoctl dump --uptime=true
dump-droplets:
./virtigoctl dump --droplets=true
dump-droplets-full:
./virtigoctl dump --droplets-full=true
dump-hypervisors:
./virtigoctl dump --hypervisors=true
start:
./virtigoctl --start www.wit.com go.wit.com
create-from-nagios-filename:
./virtigoctl create --filename=/home/nfs1/node004/kvm/nagios.lab.wit.org.qcow2