-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (44 loc) · 1.39 KB
/
Makefile
File metadata and controls
60 lines (44 loc) · 1.39 KB
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
ENV ?= digiu.local
BRANCH ?= main
build-image:
docker build --rm -t rush .
build-sdk:
docker run --rm -v "`pwd`:/app" -v "`pwd`/.rush:/root/.rush" -w /app rush bash -c "rush update; rush build -t @pancakeswap-libs/sdk;"
build-uikit:
docker run --rm -v "`pwd`:/app" -v "`pwd`/.rush:/root/.rush" -w /app rush bash -c "rush update; rush build -t @pancakeswap-libs/uikit;"
build:
docker run --rm -v "`pwd`:/app" -v "`pwd`/.rush:/root/.rush" -w /app rush bash -c "rush update; rush build;"
update:
docker run --rm -v "`pwd`:/app" -v "`pwd`/.rush:/root/.rush" -w /app rush bash -c "rush update --purge;"
purge:
docker run --rm -v "`pwd`:/app" -v "`pwd`/.rush:/root/.rush" -w /app rush bash -c "rush purge;"
start:
docker-compose -f config/${ENV}/docker-compose.yml up -d --force-recreate frontend
start-uikit:
docker-compose -f config/${ENV}/docker-compose.yml up -d --force-recreate uikit
up:
make build-image
make build
make start
logs:
docker-compose -f config/${ENV}/docker-compose.yml logs --tail 100 -f
stop:
docker-compose -f config/${ENV}/docker-compose.yml stop
ps:
docker-compose -f config/${ENV}/docker-compose.yml ps
fetch:
git fetch;
fetch-apply:
git reset --hard origin/${BRANCH}
rollout:
ifeq (yes,$(shell \
test "`git --no-pager diff "${BRANCH}" "origin/${BRANCH}"`" != "" && echo "yes" \
))
make fetch-apply
make up
else
# up-to-date!
endif
deploy:
make fetch
make rollout