-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
49 lines (40 loc) · 1.67 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
.PHONY: build run rm milestone-release release
IMAGE_NAME=local-niolesk-image
CONTAINER_NAME=local-niolesk
VERSION_CHECKER=yarn info -R --json | grep "niolesk@workspace:." | jq -M '.children.Version' | sed -e 's/"//g'
APP_VERSION=$(shell $(VERSION_CHECKER))
WORKING_DIR=$(shell pwd)
PORT=8017
rm:
docker rm --force $(CONTAINER_NAME) || true
run: rm
docker run -d --rm=true -e "NIOLESK_KROKI_ENGINE=https://kroki.io/" -p $(PORT):80 --name "$(CONTAINER_NAME)" "$(IMAGE_NAME)"
build:
docker build --rm --force-rm -t "$(IMAGE_NAME)" .
release:
bash -c '! [[ `git status --porcelain` ]]' || (echo "You must have committed everything before running a release" && false)
yarn version patch
[ -f "doc/releases/v$$($(VERSION_CHECKER)).md" ] || (echo "You must have a release file for version [v$$($(VERSION_CHECKER))] before creating release" && git reset --hard && false)
git add .
git commit -m "v$$($(VERSION_CHECKER))"
git tag "v$$($(VERSION_CHECKER))"
yarn version patch
git add .
git commit -m "v$$($(VERSION_CHECKER)) : Start new developement"
git push
git push --tags
milestone-release:
bash -c '! [[ `git status --porcelain` ]]' || (echo "You must have committed everything before running a release" && false)
yarn version minor
[ -f "doc/releases/v$$($(VERSION_CHECKER)).md" ] || (echo "You must have a release file for version [v$$($(VERSION_CHECKER))] before creating release" && git reset --hard && false)
git add .
git commit -m "v$$($(VERSION_CHECKER))"
git tag "v$$($(VERSION_CHECKER))"
yarn version minor
yarn version patch
git add .
git commit -m "v$$($(VERSION_CHECKER)) : Start new developement milestone"
git push
git push --tags
info:
@echo $(APP_VERSION)