forked from owncloud/richdocuments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (51 loc) · 1.63 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
VERSION=$(shell grep '<version>' appinfo/info.xml | sed -e 's/^.*<version>\(.*\)<\/version>.*$$/\1/')
app_name=richdocuments
project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build/artifacts
sign_dir=$(build_dir)/sign
appstore_dir=$(build_dir)/appstore
source_dir=$(build_dir)/source
package_name=$(app_name)
cert_dir=$(HOME)/.owncloud/certificates
occ=$(CURDIR)/../core/occ
.PHONY: dist
dist: appinfo/info.xml
rm -rf owncloud-collabora-online-$(VERSION)
mkdir owncloud-collabora-online-$(VERSION)
tar cf - *.php \
appinfo \
assets \
controller \
css \
img \
js \
l10n \
lib \
templates \
| ( cd owncloud-collabora-online-$(VERSION) && tar xf - )
tar cfz owncloud-collabora-online-$(VERSION).tar.gz owncloud-collabora-online-$(VERSION)
rm -rf owncloud-collabora-online-$(VERSION)
appstore:
mkdir -p $(sign_dir)
rsync -a \
--exclude=.git \
--exclude=build \
--exclude=.gitignore \
--exclude=.travis.yml \
--exclude=.scrutinizer.yml \
--exclude=CONTRIBUTING.md \
--exclude=composer.json \
--exclude=composer.lock \
--exclude=composer.phar \
--exclude=l10n/.tx \
--exclude=l10n/no-php \
--exclude=Makefile \
--exclude=nbproject \
--exclude=screenshots \
--exclude=phpunit*xml \
--exclude=tests \
--exclude=vendor/bin \
$(project_dir) $(sign_dir)
@echo "Signing…"
$(occ) integrity:sign-app --privateKey=$(cert_dir)/$(app_name).key --certificate=$(cert_dir)/$(app_name).crt --path=$(sign_dir)/$(app_name)
tar -czf $(build_dir)/$(app_name).tar.gz -C $(sign_dir) $(app_name)