forked from owncloud/web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
103 lines (82 loc) · 1.84 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
SERVER_HOST=0.0.0.0:8300
apps=files
all_apps=$(addprefix app-,$(apps))
core_bundle=dist/core/core.bundle.js
DIST := dist
HUGO := hugo
NAME := phoenix
all: build
.PHONY: build
build: core $(all_apps)
.PHONY: clean
clean: clean-core $(addprefix clean-app-,$(apps))
node_modules: package.json yarn.lock
yarn install --frozen-lockfile && touch node_modules
dist/core/core.bundle.js: node_modules
yarn run build:dev
#
# core
#
.PHONY: core
core: dist/core/core.bundle.js
.PHONY: clean-core
clean-core:
rm -rf $(DIST) $(HUGO)
rm -rf node_modules
#
# Apps
#
.PHONY: app-%
app-%:
@echo Building app $*
$(MAKE) -C apps/$*
.PHONY: clean-app-%
clean-app-%:
@echo Cleaning up app $*
$(MAKE) -C apps/$* clean
#
# Docs
#
.PHONY: docs-copy
docs-copy:
mkdir -p $(HUGO); \
mkdir -p $(HUGO)/content/extensions; \
cd $(HUGO); \
git init; \
git remote rm origin; \
git remote add origin https://github.com/owncloud/owncloud.github.io; \
git fetch; \
git checkout origin/source -f; \
rsync --delete -ax ../docs/ content/$(NAME)
.PHONY: docs-build
docs-build:
cd $(HUGO); hugo
.PHONY: docs
docs: docs-copy docs-build
#
# Test server
#
.PHONY: run
run:
php -t dist/ -S "$(SERVER_HOST)"
.PHONY: l10n-push
l10n-push:
cd l10n && tx -d push -s --no-interactive
cd apps/files/l10n && tx -d push -s --no-interactive
cd apps/markdown-editor/l10n && tx -d push -s --no-interactive
cd apps/media-viewer/l10n && tx -d push -s --no-interactive
.PHONY: l10n-pull
l10n-pull:
cd l10n && tx -d pull -a
cd apps/files/l10n && tx -d pull -a
cd apps/markdown-editor/l10n && tx -d pull -a
cd apps/media-viewer/l10n && tx -d pull -a
.PHONY: l10n-clean
l10n-clean:
cd l10n && make clean
.PHONY: l10n-read
l10n-read: node_modules
cd l10n && rm -rf template.pot && make extract
.PHONY: l10n-write
l10n-write: node_modules
cd l10n && rm -rf translations.json && make translations