-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (46 loc) · 1.39 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
VERSION = $(shell cat package.json | sed -n 's/.*"version": "\([^"]*\)",/\1/p')
current_babel_eslint = $(shell cat package.json | sed -n 's/.*"babel-eslint": "\([^"]*\)",/\1/p')
current_eslint = $(shell cat package.json | sed -n 's/.*"eslint": "\([^"]*\)",/\1/p')
SHELL = /usr/bin/env bash
YELLOW=\033[0;33m
RED=\033[0;31m
WHITE=\033[0m
GREEN=\u001B[32m
version:
@echo -e "Current version is $(GREEN) ${VERSION} $(WHITE) "
update_eslint:
@echo -e "Current eslint is $(GREEN)$(current_eslint)$(WHITE), current babel-eslint is $(GREEN)$(current_babel_eslint)$(WHITE)" ;\
npm remove --save-dev eslint babel-eslint ;\
npm install --save-dev eslint babel-eslint
default: install
.PHONY: default install run fix-permissions tag version
.PHONY: build docs battles members warlog
install:
npm install
fix-permissions:
chown ubuntu:ubuntu . -R
battles:
${MAKE} members; \
wait; \
sleep 2; \
node process_battles.js
members:
node update_members.js
warlog:
${MAKE} members; \
wait; \
sleep 2; \
node process_warlog.js
run:
@$$(npm bin)/nodemon
update_version:
@echo -e "Current version is $(GREEN) ${VERSION} $(WHITE) "
@echo -e "Next version will be $(YELLOW) ${v} $(WHITE) "
sed -i s/'"version": "$(VERSION)"'/'"version": "$(v)"'/g package.json
tag_and_push:
git add --all
git commit -a -m "Tag v $(v) $(m)"
git tag v$(v)
git push
git push --tags
tag: update_version tag_and_push