zookeeper/Makefile

65 lines
1.7 KiB
Makefile
Raw Permalink Normal View History

2024-11-15 18:49:52 -06:00
.PHONY: build
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
# create the go.mod and go.sum if this is a brand new repo
# REDOMOD = $(shell if [ -e go.mod ]; then echo go.mod; else echo no go mod; fi)
REDOMOD = $(shell if [ -e go.sum ]; then echo go.sum exists; else GO111MODULE= go mod init; GO111MODULE= go mod tidy; fi)
all: build
./zookeeper --version
2024-11-15 19:24:57 -06:00
./zookeeper
2024-11-15 18:49:52 -06:00
build:
GO111MODULE=off go build \
-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}"
# this is for release builds using the go.mod files
release-build:
@echo ${REDOMOD}
go build -v -ldflags "-X main.VERSION=${VERSION} -X gui.GUIVERSION=${VERSION}"
# makes a .deb package
debian:
2024-11-16 04:57:40 -06:00
go-deb --auto --repo go.wit.com/apps/zookeeper
2024-11-15 18:49:52 -06:00
goimports:
goimports -w *.go
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
clean:
rm -f go.*
rm -f zookeeper
# 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.wit.com/apps/zookeeper
http-toogle-ZOOD:
curl --silent http://localhost:8080/flag?flag=ZOOD
http-list-machines:
curl --silent http://localhost:8080/list
http-ConfigSave:
curl --silent http://localhost:8080/save
http-set-zood-target:
curl --silent "http://localhost:8080/target?package=zood&version=v0.0.8"
http-upgrade-hpdev2.grid.wit.com:
curl --silent "http://localhost:8080/upgrade?hostname=hpdev2.grid.wit.com"
http-upgrade-mirrors.wit.com:
curl --silent "http://localhost:8080/upgrade?hostname=mirrors.wit.com"