X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=Makefile;h=656c27b03ab3664589123369ba770c31f44604de;hb=1a216faecb5c114afbf36ecbac8ec3f795309eba;hp=6483fca78815b77994bea6539621c2826d0920e4;hpb=29712e905b8a9bdf1eaa21cbda3ca7c9eb215937;p=github%2Fshaarli%2FShaarli.git diff --git a/Makefile b/Makefile index 6483fca7..656c27b0 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,16 @@ PHP_COMMA_SOURCE = index.php,application,tests,plugins all: static_analysis_summary check_permissions test +## +# Docker test adapter +# +# Shaarli sources and vendored libraries are copied from a shared volume +# to a user-owned directory to enable running tests as a non-root user. +## +docker_%: + rsync -az /shaarli/ ~/shaarli/ + cd ~/shaarli && make $* + ## # Concise status of the project # These targets are non-blocking: || exit 0 @@ -105,7 +115,7 @@ check_permissions: @echo "----------------------" @echo "Check file permissions" @echo "----------------------" - @for file in `git ls-files`; do \ + @for file in `git ls-files | grep -v docker`; do \ if [ -x $$file ]; then \ errors=true; \ echo "$${file} is executable"; \ @@ -159,14 +169,14 @@ composer_dependencies: clean find vendor/ -name ".git" -type d -exec rm -rf {} + ### generate a release tarball and include 3rd-party dependencies -release_tar: composer_dependencies doc_html +release_tar: composer_dependencies htmldoc git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/ tar rvf $(ARCHIVE_VERSION).tar --transform "s|^doc/html|$(ARCHIVE_PREFIX)doc/html|" doc/html/ gzip $(ARCHIVE_VERSION).tar ### generate a release zip and include 3rd-party dependencies -release_zip: composer_dependencies doc_html +release_zip: composer_dependencies htmldoc git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD mkdir -p $(ARCHIVE_PREFIX)/{doc,vendor} rsync -a doc/html/ $(ARCHIVE_PREFIX)doc/html/ @@ -195,17 +205,11 @@ doxygen: clean @rm -rf doxygen @( cat Doxyfile ; echo "PROJECT_NUMBER=`git describe`" ) | doxygen - -### Convert local markdown documentation to HTML -# -# For all pages: -# - convert GitHub-flavoured relative links to standard Markdown -# - generate html documentation with mkdocs -htmlpages: +### generate HTML documentation from Markdown pages with MkDocs +htmldoc: python3 -m venv venv/ bash -c 'source venv/bin/activate; \ pip install mkdocs; \ mkdocs build' find doc/html/ -type f -exec chmod a-x '{}' \; rm -r venv - -doc_html: authors htmlpages