-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (53 loc) · 1 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
node_modules: package.json
@yarn install
@touch node_modules
# Development
# -----------
.PHONY: dev
dev: node_modules
@yarn dev
.PHONY: lint
lint: node_modules
yarn lint
yarn tsc --noEmit --pretty
.PHONY: test t
test t: node_modules
yarn jest
.PHONY: build
build: node_modules
yarn build
.PHONY: serve
serve:
python -m http.server 8000 --directory out
# Bump version
# ------------
.PHONY: release
VPART ?= minor
# target: release - Bump version
release:
@git checkout develop
@git pull
@git checkout main
@git pull
@git merge develop
@bump2version $(VPART)
@git checkout develop
@git merge main
@git push --tags origin develop main
.PHONY: minor
minor: release
.PHONY: patch
patch:
make release VPART=patch
.PHONY: major
major:
make release VPART=major
# Dockerize
# ---------
.PHONY: docker
docker:
docker build $(CURDIR) -t fl/latest -f assets/Dockerfile
RUN =
.PHONY: docker-run
docker-run: docker
@docker run --rm -it -v $(CURDIR):/var/log/backend -p 8080:80 --name fl fl/latest $(RUN)