aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 11 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 656c27b0..c2d55946 100644
--- a/Makefile
+++ b/Makefile
@@ -130,12 +130,12 @@ check_permissions:
130# See phpunit.xml for configuration 130# See phpunit.xml for configuration
131# https://phpunit.de/manual/current/en/appendixes.configuration.html 131# https://phpunit.de/manual/current/en/appendixes.configuration.html
132## 132##
133test: 133test: translate
134 @echo "-------" 134 @echo "-------"
135 @echo "PHPUNIT" 135 @echo "PHPUNIT"
136 @echo "-------" 136 @echo "-------"
137 @mkdir -p sandbox coverage 137 @mkdir -p sandbox coverage
138 @$(BIN)/phpunit --coverage-php coverage/main.cov --testsuite unit-tests 138 @$(BIN)/phpunit --coverage-php coverage/main.cov --bootstrap tests/bootstrap.php --testsuite unit-tests
139 139
140locale_test_%: 140locale_test_%:
141 @UT_LOCALE=$*.utf8 \ 141 @UT_LOCALE=$*.utf8 \
@@ -168,15 +168,15 @@ composer_dependencies: clean
168 composer install --no-dev --prefer-dist 168 composer install --no-dev --prefer-dist
169 find vendor/ -name ".git" -type d -exec rm -rf {} + 169 find vendor/ -name ".git" -type d -exec rm -rf {} +
170 170
171### generate a release tarball and include 3rd-party dependencies 171### generate a release tarball and include 3rd-party dependencies and translations
172release_tar: composer_dependencies htmldoc 172release_tar: composer_dependencies htmldoc translate
173 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD 173 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD
174 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/ 174 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/
175 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^doc/html|$(ARCHIVE_PREFIX)doc/html|" doc/html/ 175 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^doc/html|$(ARCHIVE_PREFIX)doc/html|" doc/html/
176 gzip $(ARCHIVE_VERSION).tar 176 gzip $(ARCHIVE_VERSION).tar
177 177
178### generate a release zip and include 3rd-party dependencies 178### generate a release zip and include 3rd-party dependencies and translations
179release_zip: composer_dependencies htmldoc 179release_zip: composer_dependencies htmldoc translate
180 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD 180 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD
181 mkdir -p $(ARCHIVE_PREFIX)/{doc,vendor} 181 mkdir -p $(ARCHIVE_PREFIX)/{doc,vendor}
182 rsync -a doc/html/ $(ARCHIVE_PREFIX)doc/html/ 182 rsync -a doc/html/ $(ARCHIVE_PREFIX)doc/html/
@@ -213,3 +213,8 @@ htmldoc:
213 mkdocs build' 213 mkdocs build'
214 find doc/html/ -type f -exec chmod a-x '{}' \; 214 find doc/html/ -type f -exec chmod a-x '{}' \;
215 rm -r venv 215 rm -r venv
216
217
218### Generate Shaarli's translation compiled file (.mo)
219translate:
220 @find inc/languages/ -name shaarli.po -execdir msgfmt shaarli.po -o shaarli.mo \; \ No newline at end of file