forked from owncloud/web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.release
48 lines (35 loc) · 966 Bytes
/
Makefile.release
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
SHELL := /bin/bash
YARN := $(shell command -v yarn 2> /dev/null)
ifndef YARN
$(error yarn is not available on your system, please install npm)
endif
app_name=phoenix
cur_dir=$(CURDIR)
dist_dir=$(CURDIR)/dist
.DEFAULT_GOAL := build-release
.PHONY: build-release
build-release: build package
.PHONY: build
build: build-phoenix copy-configs
.PHONY: build-phoenix
build-phoenix:
rm -rf $(dist_dir)
$(YARN) install
$(YARN) dist
.PHONY: copy-configs
copy-configs: copy-phoenix-config copy-htaccess
.PHONY: copy-phoenix-config
copy-phoenix-config:
cp config.json.dist $(dist_dir)/config.json
.Phony: copy-htaccess
copy-htaccess:
cp .htaccess $(dist_dir)
.PHONY: package
package: create-release-folder create-package
.PHONY: create-release-folder
create-release-folder:
rm -rf $(CURDIR)/release
mkdir $(CURDIR)/release
.PHONY: create-package
create-package:
cd $(dist_dir) && tar -czf $(CURDIR)/release/$(app_name).tar.gz -C $(dist_dir) * .htaccess