-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (39 loc) · 1.27 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
.PHONY: clean test
.EXPORT_ALL_VARIABLES:
VERSION=$(shell cat VERSION)
DATE = $(shell date)
IMAGE_NAME=aidbox/stresty
IMG=${IMAGE_NAME}:${VERSION}
clean:
rm pom.xml && rm -rf .cpcache
repl:
mkdir -p target/stylo/dev/ target/shadow/dev/
clj -M:ui:test:nrepl -m nrepl.cmdline --middleware [cider.nrepl/cider-middleware]
test:
clj -M:ui:test:nrepl:kaocha
npm:
npm install
resources/VERSION:
cp VERSION resources/VERSION
# export GRAALVM_HOME=$HOME/graalvm/Contents/Home
# clojure -A:native-image --graalvm-opt 'H:ReflectionConfigurationFiles=reflection.json'
build-native: resources/VERSION
clojure -M:native-image
build: resources/VERSION
clojure -M:run-test && clojure -M:ui:build -m build && cp target/uberjar/stresty-*-standalone.jar target/stresty.jar
cp -R resources/public/* dist
cp -R target/stylo/release/public/* dist
cp -R target/shadow/release/public/* dist
rm resources/VERSION
docker:
docker build -t ${IMG} .
pub:
docker push ${IMG}
jar:
clj -M:ui:build -m build && cp target/uberjar/stresty-*-standalone.jar target/stresty.jar
deploy:
cd deploy && envsubst < kustomization.template.yaml > kustomization.yaml && kubectl apply -k .
kubectl rollout restart deployment stresty-app -n stresty
kubectl get pod -n stresty
all: jar docker pub deploy
echo "Done"