This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
62 lines (49 loc) · 1.6 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# When initially cloned the project, run make sync to download the libraries.
# Then run the
GOCMD=go
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOMOD=$(GOCMD) mod vendor
LINTER=golangci-lint
# use git describe after the first release
# XXX: for building from tar balls that don't have git meta data we need a fallback
GIT_VERSION:=$(or \
$(shell git describe --long --tags 2>/dev/null), \
$(shell printf "0.0.0.r%s.%s" "$(shell git rev-list --count HEAD)" "$(shell git rev-parse --short HEAD)") \
)
.PHONY: build
# DO NOT MAUALLY RUN
# This is for github actions.
bootstrap:
mkdir -p ${HOME}/.kube
cp ./configs/public.cfg ${HOME}/.kube/config
cp ./configs/smtp_test_template.yaml ./configs/smtp_test.yaml
cp ./configs/headnode_template.yaml ./configs/headnode.yaml
cp ./configs/namecheap_template.yaml ./configs/namecheap.yaml
fedmanctl:
$(GOCMD) install ./cmd/fedmanctl/fedmanctl.go
gen:
./hack/update-codegen.sh
sync:
$(GOCLEAN) --modcache
$(GOMOD)
test:
cp ./configs/smtp_test_template.yaml ./configs/smtp_test.yaml
cp ./configs/headnode_template.yaml ./configs/headnode.yaml
cp ./configs/namecheap_template.yaml ./configs/namecheap.yaml
$(GOCLEAN) -testcache
$(GOTEST) -covermode atomic ./...
build:
docker-compose -f ./build/yamls/docker-compose.yaml build
rebuild: stop clean build start
start: build
docker-compose -f ./build/yamls/docker-compose.yaml up -d
run:
docker-compose -f ./build/yamls/docker-compose.yaml up -d
stop:
docker-compose -f ./build/yamls/docker-compose.yaml down
clean:
docker-compose -f ./build/yamls/docker-compose.yaml down --rmi all
$(GOCLEAN)
lint:
$(LINTER) run