Add target to create appstore package.
This commit is contained in:
parent
9f19ca3256
commit
2b69f1b2ef
2 changed files with 46 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
/pdfjs-*.zip
|
/pdfjs-*.zip
|
||||||
3rdparty/pdfjs/
|
3rdparty/pdfjs/
|
||||||
|
build/
|
||||||
server/config.js
|
server/config.js
|
||||||
server/package-lock.json
|
server/package-lock.json
|
||||||
|
|
|
||||||
45
Makefile
45
Makefile
|
|
@ -1,5 +1,15 @@
|
||||||
PDFJS_VERSION=2.0.943
|
PDFJS_VERSION=2.0.943
|
||||||
|
|
||||||
|
app_name=pdfdraw
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
all: 3rdparty
|
all: 3rdparty
|
||||||
|
|
||||||
3rdparty: pdfjs
|
3rdparty: pdfjs
|
||||||
|
|
@ -12,3 +22,38 @@ pdfjs: pdfjs-${PDFJS_VERSION}-dist.zip
|
||||||
unzip -qo pdfjs-${PDFJS_VERSION}-dist.zip -d 3rdparty/pdfjs
|
unzip -qo pdfjs-${PDFJS_VERSION}-dist.zip -d 3rdparty/pdfjs
|
||||||
|
|
||||||
build: 3rdparty
|
build: 3rdparty
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(build_dir)
|
||||||
|
|
||||||
|
appstore: clean build
|
||||||
|
mkdir -p $(sign_dir)
|
||||||
|
rsync -a \
|
||||||
|
--exclude=build \
|
||||||
|
--exclude=.eslintignore \
|
||||||
|
--exclude=.eslintrc.yml \
|
||||||
|
--exclude=.git \
|
||||||
|
--exclude=.github \
|
||||||
|
--exclude=.gitignore \
|
||||||
|
--exclude=.gitmodules \
|
||||||
|
--exclude=Makefile \
|
||||||
|
--exclude=node_modules \
|
||||||
|
--exclude=pdfjs*.zip \
|
||||||
|
--exclude=package.json \
|
||||||
|
--exclude=run-*lint.sh \
|
||||||
|
--exclude=.stylelintrc \
|
||||||
|
$(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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue