-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Render poll description in invitations with markdown * update makefile * remove doctrine/orm * psalm ignore doctrine errors * update workflows
- Loading branch information
Showing
10 changed files
with
299 additions
and
900 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
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
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
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# This file is licensed under the Affero General Public License version 3 or | ||
# later. See the COPYING file. | ||
# @author Bernhard Posselt <[email protected]> | ||
# @author Vinzenz Rosenkranz <[email protected]> | ||
# @author René Gieling <[email protected]> | ||
# @copyright Bernhard Posselt 2016 | ||
|
||
# Dependencies: | ||
|
@@ -20,98 +22,91 @@ appstore_build_dir=$(build_dir)/artifacts/appstore | |
appstore_package_name=$(appstore_build_dir)/$(app_name) | ||
nc_cert_dir=$(HOME)/.nextcloud/certificates | ||
composer=$(shell which composer 2> /dev/null) | ||
version=$(shell node -p -e "require('./package.json').version") | ||
|
||
all: dev-setup appstore | ||
# all steps for an appstore release | ||
appstore: setup-build build-js-production package | ||
|
||
# Dev environment setup | ||
dev-setup: clean-dev npm-init composer | ||
# install deps for release package | ||
setup-build: install-composer-build-deps npm-init | ||
|
||
# install deps for ci (tests and analysis) | ||
setup-dev: composer install-composer-dev-deps npm-init | ||
|
||
# install composer deps for ci (tests and analysis) | ||
install-composer-build-deps: composer | ||
composer install --no-dev -o | ||
|
||
# install composer deps for release package | ||
install-composer-dev-deps: composer | ||
composer install -o | ||
|
||
# install node deps | ||
npm-init: | ||
npm ci | ||
|
||
# a copy is fetched from the web | ||
.PHONY: composer | ||
composer: | ||
ifeq (,$(composer)) | ||
@echo "No composer command available, downloading a copy from the web" | ||
mkdir -p $(build_tools_dir) | ||
curl -sS https://getcomposer.org/installer | php | ||
mv composer.phar $(build_tools_dir) | ||
php $(build_tools_dir)/composer.phar install --prefer-dist | ||
php $(build_tools_dir)/composer.phar update --prefer-dist | ||
else | ||
composer install --prefer-dist | ||
composer update --prefer-dist | ||
endif | ||
# remove build dir | ||
clean: | ||
rm -rf $(build_dir) | ||
|
||
# remove deps | ||
clean-dev: clean | ||
rm -rf node_modules | ||
rm -rf ./vendor | ||
|
||
# Lint | ||
# lint js, css and php | ||
lint: | ||
npm run lint | ||
npm run stylelint | ||
composer run cs:check | ||
|
||
# lint fix js, css and php | ||
lint-fix: | ||
npm run lint:fix | ||
npm run stylelint:fix | ||
composer run cs:fix | ||
|
||
# Removes the appstore build and compiled js files | ||
.PHONY: clean | ||
clean: | ||
rm -rf $(build_dir) | ||
rm -rf js/* | ||
mkdir -p js | ||
clean-dev: clean | ||
rm -rf node_modules | ||
rm -rf ./vendor | ||
|
||
# Build js | ||
# Installs and updates the composer dependencies. If composer is not installed | ||
# build vue app | ||
build-js-production: | ||
npm run build | ||
npm run build | ||
|
||
# install composer, if not installed | ||
.PHONY: composer | ||
composer: | ||
ifeq (,$(composer)) | ||
@echo "No composer command available, downloading a copy from the web" | ||
mkdir -p $(build_tools_dir) | ||
curl -sS https://getcomposer.org/installer | php | ||
mv composer.phar $(build_tools_dir) | ||
php $(build_tools_dir)/composer.phar install --prefer-dist | ||
php $(build_tools_dir)/composer.phar update --prefer-dist | ||
endif | ||
|
||
# Builds the source package for the app store, ignores php and js tests | ||
.PHONY: appstore | ||
appstore: clean lint build-js-production | ||
# Builds the source package for the appstore | ||
# signs, if certificate is present | ||
package: clean | ||
mkdir -p $(build_source_dir) | ||
mkdir -p $(appstore_build_dir) | ||
rsync -a \ | ||
--exclude="ISSUE_TEMPLATE.md" \ | ||
--exclude="*.log" \ | ||
--exclude=".*" \ | ||
--exclude="_*" \ | ||
--exclude="build" \ | ||
--exclude="bower.json" \ | ||
--exclude="composer.*" \ | ||
--exclude="js/.*" \ | ||
--exclude="js/*.log" \ | ||
--exclude="js/bower.json" \ | ||
--exclude="js/karma.*" \ | ||
--exclude="js/node_modules" \ | ||
--exclude="js/package.json" \ | ||
--exclude="js/protractor.*" \ | ||
--exclude="js/test" \ | ||
--exclude="js/tests" \ | ||
--exclude="karma.*" \ | ||
--exclude="l10n/no-php" \ | ||
--exclude="Makefile" \ | ||
--exclude="node_modules" \ | ||
--exclude="package*" \ | ||
--exclude="phpunit*xml" \ | ||
--exclude="protractor.*" \ | ||
--exclude="psalm.*" \ | ||
--exclude="screenshots" \ | ||
--exclude="src" \ | ||
--exclude="tests" \ | ||
--exclude="vendor" \ | ||
--exclude="webpack.*" \ | ||
$(project_dir)/ $(build_source_dir)/$(app_name) | ||
rsync -zarh \ | ||
$(project_dir)/appinfo \ | ||
$(project_dir)/js \ | ||
$(project_dir)/l10n \ | ||
$(project_dir)/lib \ | ||
$(project_dir)/templates \ | ||
$(project_dir)/vendor \ | ||
$(project_dir)/COPYING \ | ||
$(project_dir)/README.md \ | ||
$(project_dir)/CHANGELOG.md \ | ||
$(build_source_dir)/$(app_name) | ||
tar -czf $(appstore_package_name).tar.gz \ | ||
--directory="$(build_source_dir)" $(app_name) | ||
@if [ -f $(nc_cert_dir)/$(app_name).key ]; then \ | ||
echo "Signing package..."; \ | ||
openssl dgst -sha512 -sign $(nc_cert_dir)/$(app_name).key $(appstore_build_dir)/$(app_name).tar.gz | openssl base64; \ | ||
fi | ||
|
||
|
||
.PHONY: test | ||
test: composer | ||
test: composer install-composer-dev-deps | ||
$(CURDIR)/vendor/phpunit/phpunit/phpunit --coverage-clover clover.xml -c tests/phpunit.xml | ||
$(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml |
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
Oops, something went wrong.