-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
64 lines (55 loc) · 1.96 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
# ===========
# PRODUCTION
# ===========
start:
echo 'Starting PROD container'
docker-compose -f docker-compose.yml up -d
log-listen:
echo 'Starting PROD container'
docker-compose -f docker-compose.yml up
update-scores-web:
echo 'Updating PROD Scores Web container...'
git pull origin main
# -docker rm $(docker stop $(docker ps -a -q --filter="name=betarena_about_scores_web_1" --format="{{.ID}}"))
# -docker rmi $$(docker images -q scores_web)
# -docker rmi $$(docker images --filter "dangling=true" -q --no-trunc)
# docker-compose -f docker-compose.yml up -d
docker-compose -f docker-compose.yml up -d --build
# -docker rm $$(docker stop $$(docker ps -a -q --filter="name=scores_scores_web_1" --format="{{.ID}}"))
# -docker rmi $$(docker images -q scores_web)
# -docker rmi $$(docker images --filter "dangling=true" -q --no-trunc)
# docker-compose -f docker-compose.yml up -d
docker-compose -f docker-compose.yml up -d --build
# ===========
# DEVELOPMENT
# ===========
dev-start:
echo 'Starting DEV Environment'
npm run dev
echo 'Removing Old DEV Logs'
-rm -r ./datalog/*
echo 'DEV Ready!'
dev-docker-start:
echo 'Starting DEV - Docker Environment'
echo 'Removing Old DEV Logs'
-rm -r ./datalog/*
docker-compose -f docker-compose.dev.yml up
echo 'DEV Ready!'
dev-clean:
echo 'Removing Old DEV Logs'
rm -r ./datalog/
git-post-main-pr:
# from Develop and assuming your master is up to date with origin/master
echo 'Checking out to MAIN'
git checkout main
echo 'Pulling new changes from MAIN'
git pull origin main
echo 'Checkout to DEV'
git checkout dev
echo 'Resetting to MAIN'
git reset --hard main
git-del-branches-w-origin:
echo 'Deleting branches not present in origin + /dev'
# Original command (below) is without \(...\) syntax
# git fetch -p ; git branch -r | awk '{print $$1}' | egrep -v -f /dev/fd/0 <\(git branch -vv | grep origin\) | awk '{print $$1}' | xargs git branch -D
# git branch --merged | grep -v "*" | grep -v "main" | xargs git branch -d