blob: 2fdce1797426d6e5b05b3014df023e357a9274d9 (
plain)
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
|
# Makefile for building the project
app_name=spreed
project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build/artifacts
appstore_dir=$(build_dir)/appstore
source_dir=$(build_dir)/source
sign_dir=$(build_dir)/sign
package_name=$(app_name)
cert_dir=$(HOME)/.nextcloud/certificates
version+=master
all: dev-setup build-js-production
dev-setup: clean-dev npm-init
dependabot: dev-setup npm-update build-js-production compile-handlebars-templates bundle-simplewebrtc
release: appstore create-tag
build-js:
cd vue/ && npm run dev
build-js-production:
cd vue/ && npm run build
watch-js:
cd vue/ && npm run watch
lint:
cd vue/ && npm run lint
lint-fix:
cd vue/ && npm run lint:fix
npm-init: npm-init-root npm-init-vue
npm-init-root:
npm install
npm-init-vue:
cd vue/ && npm install
npm-update:
npm update
cd vue/ && npm update
clean:
rm -f js/admin/*.js
rm -f js/admin/*.js.map
rm -f js/collections.js
rm -f js/collections.js.map
rm -f js/collectionsintegration.js
rm -f js/collectionsintegration.js.map
rm -rf $(build_dir)
clean-dev: clean
rm -rf node_modules
cd vue/ && rm -rf node_modules
compile-handlebars-templates:
bash compile-handlebars-templates.sh
bundle-simplewebrtc:
# webrtc-adapter uses JavaScript features not supported by browserify,
# so the sources need to be transformed using babel to a compatible
# version of JavaScript.
# Its main module does no longer provide "module.exports", which is
# expected by the code using it, so it needs to be added back with a
# plugin.
npx browserify --standalone SimpleWebRTC --transform [ babelify --global --presets [ @babel/env ] --plugins [ add-module-exports ] ] js/simplewebrtc/simplewebrtc.js > js/simplewebrtc/bundled.js
create-tag:
git tag -a v$(version) -m "Tagging the $(version) release."
git push origin v$(version)
appstore:
rm -rf $(build_dir)
mkdir -p $(sign_dir)
rsync -a \
--exclude=bower.json \
--exclude=.bowerrc \
--exclude=/build \
--exclude=check-handlebars-templates.sh \
--exclude=compile-handlebars-templates.sh \
--exclude=docs \
--exclude=.drone.yml \
--exclude=.eslintignore \
--exclude=.eslintrc.yml \
--exclude=.git \
--exclude=.gitattributes \
--exclude=.github \
--exclude=.gitignore \
--exclude=.jscsrc \
--exclude=.jshintignore \
--exclude=js/views/templates \
--exclude=js/**.js.map \
--include=js/simplewebrtc/bundled.js \
--exclude=js/simplewebrtc/*.js \
--exclude=js/tests \
--exclude=l10n/no-php \
--exclude=.l10nignore \
--exclude=Makefile \
--exclude=node_modules \
--exclude=package.json \
--exclude=package-lock.json \
--exclude=phpunit*xml \
--exclude=README.md \
--exclude=run-*lint.sh \
--exclude=.scrutinizer.yml \
--exclude=.stylelintrc \
--exclude=tests \
--exclude=.travis.yml \
--exclude=.tx \
--exclude=vue \
$(project_dir)/ $(sign_dir)/$(app_name)
@if [ -f $(cert_dir)/$(app_name).key ]; then \
echo "Signing app files…"; \
php ../../occ integrity:sign-app \
--privateKey=$(cert_dir)/$(app_name).key\
--certificate=$(cert_dir)/$(app_name).crt\
--path=$(sign_dir)/$(app_name); \
fi
tar -czf $(build_dir)/$(app_name)-$(version).tar.gz \
-C $(sign_dir) $(app_name)
@if [ -f $(cert_dir)/$(app_name).key ]; then \
echo "Signing package…"; \
openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name)-$(version).tar.gz | openssl base64; \
fi
|