-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (35 loc) · 1020 Bytes
/
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
last_tag="$(shell git describe --abbrev=0 --tag)"
help:
@echo Please choose a valid target: build, test, release, final-release, clean, delete-deployments, wipe-everything
build:
{ \
cd src/; \
go build -mod=vendor -o a.out main/main.go; \
rm a.out; \
}
test:
{ \
cd src/; \
go version; \
go test -v ./...; \
}
release:
bosh create-release --force --tarball $(PWD)/cpi
final-release:
@echo "Last tag = $(last_tag)"
@if grep "version: $(last_tag)" releases/libvirt-bosh-cpi/index.yml > /dev/null; \
then \
echo "Nothing to do. $(last_tag) has already been released."; \
else \
bosh create-release --final --version=$(last_tag) --tarball $(PWD)/libvirt-bosh-cpi.tgz; \
fi
clean:
[ -f cpi ] && rm cpi
delete-deployments:
bosh --json deployments | jq -r '.Tables[].Rows[].name' | \
xargs --verbose --max-args=1 --replace={} bosh --non-interactive --deployment {} delete-deployment
wipe-everything:
@echo TODO
# dump all libvirt VMs
# clean all secrets
# clean state.json etc