This repository has been archived by the owner on Feb 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tom Needham
committed
Aug 13, 2018
1 parent
b460be2
commit 22f6d1a
Showing
3 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
SHELL := /bin/bash | ||
|
||
# | ||
# Define NPM and check if it is available on the system. | ||
# | ||
NPM := $(shell command -v npm 2> /dev/null) | ||
ifndef NPM | ||
$(error npm is not available on your system, please install npm) | ||
endif | ||
app_name=$(notdir $(CURDIR)) | ||
project_directory=$(CURDIR)/../$(app_name) | ||
build_tools_directory=$(CURDIR)/build/tools | ||
appstore_package_name=$(CURDIR)/build/dist/$(app_name) | ||
|
||
occ=$(CURDIR)/../../occ | ||
private_key=$(HOME)/.owncloud/certificates/$(app_name).key | ||
certificate=$(HOME)/.owncloud/certificates/$(app_name).crt | ||
sign=php -f $(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 | ||
|
||
PHPUNIT="$(PWD)/lib/composer/phpunit/phpunit/phpunit" | ||
|
||
drawio_doc_files=COPYING.txt screenshot.png | ||
drawio_src_dirs=appinfo img css js lib templates | ||
drawio_all_src=$(drawio_src_dirs) $(drawio_doc_files) | ||
build_dir=build | ||
dist_dir=$(build_dir)/dist | ||
|
||
.PHONY: clean | ||
clean: clean-dist clean-build | ||
|
||
# | ||
# dist | ||
# | ||
|
||
$(dist_dir)/drawio: | ||
rm -Rf $@; mkdir -p $@ | ||
cp -R $(drawio_all_src) $@ | ||
|
||
.PHONY: dist | ||
dist: clean $(dist_dir)/drawio | ||
ifdef CAN_SIGN | ||
$(sign) --path="$(appstore_package_name)" | ||
else | ||
@echo $(sign_skip_msg) | ||
endif | ||
COPYFILE_DISABLE=1 tar --exclude='._*' -czf $(appstore_package_name).tar.gz -C $(appstore_package_name)/../ $(app_name) | ||
|
||
.PHONY: clean-dist | ||
clean-dist: | ||
rm -Rf $(dist_dir) | ||
|
||
.PHONY: clean-build | ||
clean-build: | ||
rm -Rf $(build_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters