-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (50 loc) · 1.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
all: checkconfig updatecode updateusers
checkconfig:
ifeq "$(wildcard config.php)" ""
@echo =
@echo = You must create config.php file first
@echo = Start by copying config.sample.php
@echo =
@exit 1
endif
updatecode:
ifneq "$(wildcard .git )" ""
git pull origin master
git submodule init
git submodule update
endif
updateusers:
cd users && $(MAKE)
rel: release
release: assets releasetag packages
releasetag:
ifndef v
# Must specify version as 'v' param
#
# make rel v=1.1.1
#
else
#
# Tagging it with release tag
#
git tag -a REL_${subst .,_,${v}}
git push --tags
endif
packages:
ifndef v
# Must specify version as 'v' param
#
# make rel v=1.1.1
#
else
# generate the package
git clone . meetup_app_${v}
cd meetup_app_${v} && git checkout REL_${subst .,_,${v}}
cd meetup_app_${v} && ${MAKE} updatecode
cd meetup_app_${v}/users && ${MAKE} updatecode
cd meetup_app_${v} && ${MAKE} assets
cd meetup_app_${v} && find ./ -name "\.git*" | xargs -n10 rm -r
tar -c meetup_app_${v} |bzip2 > meetup_app_${v}.tar.bz2
zip -r meetup_app_${v}.zip meetup_app_${v}
rm -rf meetup_app_${v}
endif