This repository has been archived by the owner on Aug 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathMakefile
136 lines (113 loc) · 3.58 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
SHELL = bash
all: install
install: install-server install-client build-client
install-server:
composer install --no-dev
install-client:
bower install --production
npm install --no-optional
devinstall: devinstall-server devinstall-client build-client
devinstall-server:
composer install
devinstall-client:
bower install
npm install
build-client: build-semantic-ui build-moment
build-semantic-ui:
node_modules/.bin/gulp \
--gulpfile resource/view/semantic-ui/gulpfile.js \
--cwd resource/view/semantic-ui/ \
build
cp -v -r \
resource/view/semantic-ui/dist/themes/default/assets/fonts \
public/static/vendor/semantic-ui
build-moment:
mkdir -p public/static/vendor/moment/
cp \
node_modules/moment/min/moment.min.js \
public/static/vendor/moment/
clean:
find . -name ".DS_Store" | \
xargs rm -f
rm -rf node_modules
rm -rf resource/view/semantic-ui/dist/
find public/static/vendor/ember \
-type f \
-not -name 'ember.js' -and \
-not -name 'ember.min.js' -and \
-not -name 'ember-template-compiler.js' | \
xargs rm -f
find public/static/vendor/ember-data \
-type f \
-not -name 'ember-data.js' -and \
-not -name 'ember-data.js.map' -and \
-not -name 'ember-data.min.js' | \
xargs rm -f
find public/static/vendor/ember-simple-auth \
-type f \
-not -name 'simple-auth.js' | \
xargs rm -f
find public/static/vendor/node-uuid \
-not -name 'node-uuid' -and \
-not -name 'uuid.js' | \
xargs rm -rf
find public/static/vendor/event-source-polyfill \
-not -name 'event-source-polyfill' -and \
-not -name 'eventsource.js' -and \
-not -name 'eventsource.min.js' | \
xargs rm -rf
find public/static/vendor/jquery \
-not -name 'jquery' -and \
-not -name 'dist' -and \
-not -name 'jquery.js' -and \
-not -name 'jquery.min.js' -and \
-not -name 'jquery.min.map' | \
xargs rm -rf
rm -f data/log/*.log
find vendor -maxdepth 1 -type d | \
xargs rm -rf
rm -f vendor/autoload.php
find bin -maxdepth 1 -type l | \
xargs rm
find public/static/vendor -maxdepth 1 -type d | \
xargs rm -rf
uninstall:
@echo 'You are going to uninstall sabre/katana and lose everything!'
@read -p 'Are you sure? [Y/n] ' go; \
if [[ 'Y' = $$go ]]; then \
$(MAKE) headless-uninstall
else \
echo 'Aborted!'; \
fi
headless-uninstall:
echo 'Remove data/configuration/server.json'; \
rm -f data/configuration/server.json; \
echo 'Remove data/database/katana_*.sqlite'; \
rm -f data/database/katana_*.sqlite; \
echo 'Remove data/home/*'; \
find data/home/* -maxdepth 1 -type d | \
xargs rm -rf; \
test: devinstall-server
bin/atoum \
--configurations tests/.atoum.php \
--bootstrap-file tests/.bootstrap.atoum.php
bin/sabre-cs-fixer \
fix \
--dry-run \
--diff \
.
DISTFILES = .bowerrc CHANGELOG.md LICENSE Makefile README.md bin bootstrap.php bower.json composer.json composer.lock data lib package.json public resource semantic.json tests vendor
DISTPOINTLESS = .bowerrc Makefile bower.json composer.json composer.lock node_modules tests
KATANA_VERSION = $(shell ./bin/katana --version)
dist: dist-clean
mkdir -p build/sabre-katana
cp -Rv $(DISTFILES) build/sabre-katana
$(MAKE) -C build/sabre-katana headless-uninstall
$(MAKE) -C build/sabre-katana clean
$(MAKE) -C build/sabre-katana all
cd build/sabre-katana; \
rm -r $(DISTPOINTLESS)
cd build; zip -r sabre-katana-$(KATANA_VERSION).zip sabre-katana
dist-clean:
rm -rf build/sabre-katana
.PHONY: all install install-server install-client devinstall devinstall-server devinstall-clietn build-semantic-ui build-moment clean distclean distclean-server distclean-client uninstall testo dist-clean