Skip to content

Commit

Permalink
Update makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Aug 21, 2018
1 parent 783dee8 commit 72cfe3d
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
app_name=bruteforcesettings
app_name=twofactor_email

project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build/artifacts
Expand All @@ -7,7 +7,6 @@ source_dir=$(build_dir)/source
sign_dir=$(build_dir)/sign
package_name=$(app_name)
cert_dir=$(HOME)/.nextcloud/certificates
version+=1.1.0

all: dev-setup build-js-production

Expand Down Expand Up @@ -36,12 +35,6 @@ clean-dev:
rm -rf node_modules
rm -rf $(build_dir)

release: appstore create-tag

create-tag:
git tag -s -a v$(version) -m "Tagging the $(version) release."
git push origin v$(version)

appstore: clean-dev
mkdir -p $(sign_dir)
rsync -a \
Expand All @@ -61,10 +54,18 @@ appstore: clean-dev
--exclude=/.scrutinizer.yml \
--exclude=/.travis.yml \
--exclude=/Makefile \
--exclude=/node_modules \
$(project_dir)/ $(sign_dir)/$(app_name)
tar -czf $(build_dir)/$(app_name)-$(version).tar.gz \
@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).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; \
openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name).tar.gz | openssl base64; \
fi

0 comments on commit 72cfe3d

Please sign in to comment.