Skip to content

Commit a0a7ad1

Browse files
committed
Add make file for faster releasing
Signed-off-by: Joas Schilling <[email protected]>
1 parent ed8c21a commit a0a7ad1

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Exclude npm deps
2+
build
23
node_modules
34

45
# Karma/jasmine coverage data

Makefile

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Makefile for building the project
2+
3+
app_name=spreed
4+
5+
project_dir=$(CURDIR)/../$(app_name)
6+
build_dir=$(CURDIR)/build/artifacts
7+
appstore_dir=$(build_dir)/appstore
8+
source_dir=$(build_dir)/source
9+
sign_dir=$(build_dir)/sign
10+
package_name=$(app_name)
11+
cert_dir=$(HOME)/.nextcloud/certificates
12+
version+=master
13+
14+
all: appstore
15+
16+
clean:
17+
echo $(version)
18+
rm -rf $(build_dir)
19+
rm -rf node_modules
20+
21+
install-deps: install-npm-deps
22+
23+
install-npm-deps:
24+
npm install --production
25+
26+
install-npm-deps-dev:
27+
npm install --deps
28+
29+
dev-setup: install-npm-deps-dev
30+
31+
appstore: clean install-deps
32+
mkdir -p $(sign_dir)
33+
rsync -a \
34+
--exclude=bower.json \
35+
--exclude=.bowerrc \
36+
--exclude=build \
37+
--exclude=CONTRIBUTING.md \
38+
--exclude=docs \
39+
--exclude=.drone.yml \
40+
--exclude=.eslintignore \
41+
--exclude=.eslintrc.yml \
42+
--exclude=.git \
43+
--exclude=.gitattributes \
44+
--exclude=.github \
45+
--exclude=.gitignore \
46+
--exclude=issue_template.md \
47+
--exclude=.jscsrc \
48+
--exclude=.jshintignore \
49+
--exclude=js/tests \
50+
--exclude=karma.conf.js \
51+
--exclude=l10n/no-php \
52+
--exclude=l10n/.tx \
53+
--exclude=Makefile \
54+
--exclude=node_modules \
55+
--exclude=package.json \
56+
--exclude=phpunit*xml \
57+
--exclude=README.md \
58+
--exclude=run-*lint.sh \
59+
--exclude=screenshots \
60+
--exclude=.scrutinizer.yml \
61+
--exclude=.stylelintrc \
62+
--exclude=tests \
63+
--exclude=.travis.yml \
64+
$(project_dir) $(sign_dir)
65+
@if [ -f $(cert_dir)/$(app_name).key ]; then \
66+
echo "Signing app files…"; \
67+
php ../../occ integrity:sign-app \
68+
--privateKey=$(cert_dir)/$(app_name).key\
69+
--certificate=$(cert_dir)/$(app_name).crt\
70+
--path=$(sign_dir)/$(app_name); \
71+
fi
72+
tar -czf $(build_dir)/$(app_name)-$(version).tar.gz \
73+
-C $(sign_dir) $(app_name)
74+
@if [ -f $(cert_dir)/$(app_name).key ]; then \
75+
echo "Signing package…"; \
76+
openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name)-$(version).tar.gz | openssl base64; \
77+
fi
78+

0 commit comments

Comments
 (0)