forked from retailcrm/woocommerce-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (38 loc) · 1.48 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FILE = $(TRAVIS_BUILD_DIR)/VERSION
VERSION = `cat $(FILE)`
.PHONY: test
svn_clone:
mkdir /tmp/svn_plugin_dir
svn co $(SVNREPOURL) /tmp/svn_plugin_dir --username $(USERNAME) --password $(PASSWORD) --no-auth-cache
svn_push: /tmp/svn_plugin_dir
if [ ! -d "/tmp/svn_plugin_dir/tags/$(VERSION)" ]; then \
svn delete /tmp/svn_plugin_dir/trunk/*; \
rm -rf /tmp/svn_plugin_dir/trunk/*; \
cp -R $(TRAVIS_BUILD_DIR)/src/* /tmp/svn_plugin_dir/trunk; \
svn copy /tmp/svn_plugin_dir/trunk /tmp/svn_plugin_dir/tags/$(VERSION) --username $(USERNAME) --password $(PASSWORD) --no-auth-cache; \
svn add /tmp/svn_plugin_dir/trunk/* --force; \
svn add /tmp/svn_plugin_dir/tags/$(VERSION)/* --force; \
svn ci /tmp/svn_plugin_dir -m $(VERSION) --username $(USERNAME) --password $(PASSWORD) --no-auth-cache; \
fi
remove_dir:
rm -rf /tmp/svn_plugin_dir
compile_pot:
msgfmt resources/pot/retailcrm-ru_RU.pot -o src/languages/retailcrm-ru_RU.mo
msgfmt resources/pot/retailcrm-es_ES.pot -o src/languages/retailcrm-es_ES.mo
install:
bash tests/bin/install.sh $(DB_NAME) $(DB_USER) $(DB_HOST) $(WP_VERSION) $(WC_VERSION) $(DB_PASS) $(SKIP_DB_CREATE)
ifeq ($(USE_COMPOSER),1)
composer install
endif
test:
ifeq ($(USE_COMPOSER),1)
vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
else
phpunit -c phpunit.xml.dist
endif
local_test: install
phpunit -c phpunit.xml.dist
run_tests:
docker-compose --no-ansi up -d --build mysql
docker-compose --no-ansi run --rm --no-deps app make local_test
docker-compose stop