summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-04-21 00:32:03 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-04-21 00:32:03 +0200
commit060b048f013dd35d22f385008b92c3cc5895ef63 (patch)
tree181ded219948a50f1d7b1d498438b6bf2089c65f /Makefile
parentf761c36ebc3db6436870fff6f1498a07657445db (diff)
only sign when key, cert and occ is found
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 56e60437c..129aa8aa7 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,14 @@ occ=$(CURDIR)/../../occ
private_key=$(HOME)/.owncloud/$(app_name).key
certificate=$(HOME)/.owncloud/$(app_name).crt
sign="$(occ) integrity:sign-app --privateKey=$(private_key) --certificate=$(certificate)"
+sign_skip_msg="Skipping signing, either no key and certificate found in $(private_key) and $(certificate) or occ can not be found at $(occ)"
+ifneq (,$(wildcard $(private_key)))
+ifneq (,$(wildcard $(certificate)))
+ifneq (,$(wildcard $(occ)))
+ CAN_SIGN=true
+endif
+endif
+endif
all: build
@@ -126,10 +134,10 @@ source:
--exclude=/build/ \
--exclude=/js/node_modules/ \
--exclude=*.log
-ifneq ($(wildcard $(private_key)),)
+ifdef CAN_SIGN
$(sign) --path $(source_build_directory)
else
- @echo "Skipping signing, no key and certificate found in $(private_key) and $(certificate)"
+ @echo $(sign_skip_msg)
endif
tar -cvzf $(source_package_name).tar.gz -C $(source_build_directory)/../ $(app_name)
@@ -174,10 +182,10 @@ appstore:
"js/build/app.min.js" \
"js/admin/Admin.js" \
$(appstore_build_directory)
-ifneq ($(wildcard $(private_key)),)
+ifdef CAN_SIGN
$(sign) --path $(appstore_build_directory)
else
- @echo "Skipping signing, no key and certificate found in $(private_key) and $(certificate)"
+ @echo $(sign_skip_msg)
endif
tar -czf $(appstore_package_name).tar.gz -C $(appstore_build_directory)/../ $(app_name)