forked from zero-one-group/geni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (61 loc) · 2.07 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
DOCKERNAME=zeroonetechnology/geni
VERSION=`cat resources/GENI_REPL_RELEASED_VERSION`
build:
cp project.clj docker/project.clj
docker build -f docker/Dockerfile \
-t $(DOCKERNAME):latest \
docker
docker-pull:
docker pull $(DOCKERNAME):$(VERSION)
docker-push: build
docker push $(DOCKERNAME):latest
docker-release: build
cp project.clj docker/project.clj
docker build -f docker/Dockerfile --no-cache \
-t $(DOCKERNAME):$(VERSION) \
-t $(DOCKERNAME):latest \
docker
docker push $(DOCKERNAME):$(VERSION)
dock: build
docker run --rm -v $(PWD):/root/geni -w /root/geni -it $(DOCKERNAME) \
/bin/bash
repl: build
docker run --rm -v $(PWD):/root/geni -w /root/geni -it $(DOCKERNAME) \
lein repl
autotest: build
docker run --rm -v $(PWD):/root/geni -w /root/geni -t $(DOCKERNAME) \
lein midje :autotest
coverage: build
$(eval TMP := $(shell mktemp -d))
cp -r . $(TMP)
docker run --rm -v $(TMP):/root/geni -w /root/geni -t $(DOCKERNAME) \
scripts/coverage
lint-ancient: build
$(eval TMP := $(shell mktemp -d))
cp -r . $(TMP)
docker run --rm -v $(TMP):/root/geni -w /root/geni -t $(DOCKERNAME) \
scripts/lint-ancient
test-geni-cli: build
$(eval TMP := $(shell mktemp -d))
cp -r . $(TMP)
docker run --rm -v $(TMP):/root/geni -w /root/geni -t $(DOCKERNAME) \
scripts/test-geni-cli
test-templates: build
$(eval TMP := $(shell mktemp -d))
cp -r . $(TMP)
docker run --rm -v $(TMP):/root/geni -w /root/geni -t $(DOCKERNAME) \
/bin/bash -c "scripts/test-lein-template && scripts/test-clj-app-uberjar"
test-install-geni-cli: build
$(eval TMP := $(shell mktemp -d))
cp -r . $(TMP)
docker run --rm -v $(TMP):/root/geni -w /root/geni -t $(DOCKERNAME) \
scripts/test-install-geni-cli
ci: coverage test-install-geni-cli test-geni-cli test-templates lint-ancient
echo "CI steps passed!"
version-bumps: build
docker run --rm -v $(PWD):/root/geni -w /root/geni -t $(DOCKERNAME) \
scripts/version-bumps.clj
pre-release: coverage test-install-geni-cli test-geni-cli lint-ancient
echo "Pre-release steps passed!"
post-release: test-templates
echo "Post-release steps passed!"