Skip to content

Commit

Permalink
Enh/email markdown (#1631)
Browse files Browse the repository at this point in the history
* Render poll description in invitations with markdown
* update makefile
* remove doctrine/orm
* psalm ignore doctrine errors
* update workflows
  • Loading branch information
dartcafe authored May 22, 2021
1 parent b845e6e commit 56d4220
Show file tree
Hide file tree
Showing 10 changed files with 299 additions and 900 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/app-code-check-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
php-versions: ['7.4']
server-versions: ['master', 'stable19', 'stable20']
server-versions: ['master', 'stable20', 'stable21']

name: AppCode check php${{ matrix.php-versions }}-${{ matrix.server-versions }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/app-code-check-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.0']
server-versions: ['master']
server-versions: ['master', 'stable21']

name: AppCode check php${{ matrix.php-versions }}-${{ matrix.server-versions }}
steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
APP_NAME: polls

jobs:
php:
sqlite:
runs-on: ubuntu-latest

strategy:
Expand All @@ -20,7 +20,7 @@ jobs:
matrix:
php-versions: ['7.4', '8.0']
databases: ['sqlite']
server-versions: ['master']
server-versions: ['master', 'stable21']

name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}

Expand Down Expand Up @@ -79,9 +79,9 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['7.3', '7.4', '8.0']
php-versions: ['7.4', '8.0']
databases: ['mysql']
server-versions: ['master']
server-versions: ['master', 'stable21']

name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}

Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
matrix:
php-versions: ['7.4', '8.0']
databases: ['pgsql']
server-versions: ['master']
server-versions: ['master', 'stable21']

name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}

Expand Down
127 changes: 61 additions & 66 deletions Makefile
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:
Expand All @@ -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
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"league/factory-muffin": "^3.0",
"league/factory-muffin-faker": "^2.0",
"nextcloud/coding-standard": "^0.5.0",
"doctrine/orm": "^2.7",
"vimeo/psalm": "^4.3"
},
"scripts": {
Expand All @@ -39,5 +38,8 @@
"psalm": "php vendor/vimeo/psalm/psalm",
"psalm:fix": "php vendor/vimeo/psalm/psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
"psalm:info": "php vendor/vimeo/psalm/psalm --show-info=true"
},
"require": {
"league/commonmark": "^1.6"
}
}
Loading

0 comments on commit 56d4220

Please sign in to comment.