2017-04-26 18:45:53 +03:00
|
|
|
app_name=sharepoint
|
2017-04-26 16:09:54 +03:00
|
|
|
|
2017-04-26 18:45:53 +03:00
|
|
|
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
|
2018-12-14 15:29:42 +03:00
|
|
|
version+=1.4.0
|
2017-04-26 16:09:54 +03:00
|
|
|
|
2017-04-26 18:45:53 +03:00
|
|
|
all: appstore
|
2017-04-26 16:09:54 +03:00
|
|
|
|
2017-04-26 18:45:53 +03:00
|
|
|
release: appstore create-tag
|
2017-04-26 16:09:54 +03:00
|
|
|
|
2017-04-26 18:45:53 +03:00
|
|
|
create-tag:
|
|
|
|
git tag -s -a v$(version) -m "Tagging the $(version) release."
|
|
|
|
git push origin v$(version)
|
2017-04-26 16:09:54 +03:00
|
|
|
|
|
|
|
clean:
|
2017-04-26 18:45:53 +03:00
|
|
|
rm -rf $(build_dir)
|
2017-04-26 16:09:54 +03:00
|
|
|
rm -rf node_modules
|
|
|
|
|
2017-04-26 18:45:53 +03:00
|
|
|
appstore: clean
|
|
|
|
mkdir -p $(sign_dir)
|
|
|
|
rsync -a \
|
|
|
|
--exclude=/build \
|
|
|
|
--exclude=/docs \
|
2018-02-27 16:21:56 +03:00
|
|
|
--exclude=/translationfiles \
|
2018-02-13 21:51:52 +03:00
|
|
|
--exclude=/.tx \
|
2017-04-26 18:45:53 +03:00
|
|
|
--exclude=/tests \
|
2018-01-25 17:53:54 +03:00
|
|
|
--exclude=.git \
|
2017-04-26 18:45:53 +03:00
|
|
|
--exclude=/.github \
|
|
|
|
--exclude=/l10n/l10n.pl \
|
|
|
|
--exclude=/CONTRIBUTING.md \
|
|
|
|
--exclude=/issue_template.md \
|
|
|
|
--exclude=/README.md \
|
|
|
|
--exclude=/.gitattributes \
|
|
|
|
--exclude=/.gitignore \
|
|
|
|
--exclude=/.scrutinizer.yml \
|
|
|
|
--exclude=/.travis.yml \
|
2018-08-03 16:14:50 +03:00
|
|
|
--exclude=phpunit*.xml \
|
|
|
|
--exclude=composer.* \
|
|
|
|
--exclude=vendor/cweagans \
|
|
|
|
--exclude=vendor/vrem/php-spo \
|
2017-04-26 18:45:53 +03:00
|
|
|
--exclude=/Makefile \
|
2018-08-03 16:14:50 +03:00
|
|
|
--include=vendor/vrem/php-spo/src \
|
|
|
|
--include=vendor/vrem/php-spo/LICENSE.md \
|
2017-04-26 18:45:53 +03:00
|
|
|
$(project_dir)/ $(sign_dir)/$(app_name)
|
|
|
|
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
|