2018-04-27 11:19:02 +03:00
|
|
|
FILE = $(TRAVIS_BUILD_DIR)/VERSION
|
|
|
|
VERSION = `cat $(FILE)`
|
|
|
|
|
2019-03-20 15:56:37 +03:00
|
|
|
all: svn_clone svn_push remove_dir
|
2018-04-27 11:19:02 +03:00
|
|
|
|
|
|
|
svn_clone:
|
|
|
|
mkdir /tmp/svn_plugin_dir
|
|
|
|
svn co $(SVNREPOURL) /tmp/svn_plugin_dir --username $(USERNAME) --password $(PASSWORD) --no-auth-cache
|
|
|
|
|
2019-03-20 15:56:37 +03:00
|
|
|
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
|
2018-04-27 11:19:02 +03:00
|
|
|
|
|
|
|
remove_dir:
|
|
|
|
rm -rf /tmp/svn_plugin_dir
|
2020-02-25 13:45:17 +03:00
|
|
|
|
|
|
|
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:
|
2020-02-25 14:00:08 +03:00
|
|
|
bash tests/bin/install.sh wc_retailcrm_test root '' localhost $(WP_VERSION)
|
2020-02-25 14:26:27 +03:00
|
|
|
ifeq ($(USE_COMPOSER),1)
|
2020-02-25 13:45:17 +03:00
|
|
|
composer install
|
2020-02-25 14:26:27 +03:00
|
|
|
endif
|
2020-02-25 13:45:17 +03:00
|
|
|
|
2020-02-25 14:30:38 +03:00
|
|
|
tests:
|
2020-02-25 13:45:17 +03:00
|
|
|
ifeq ($(USE_COMPOSER),1)
|
|
|
|
vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
|
|
|
|
else
|
|
|
|
phpunit -c phpunit.xml.dist
|
|
|
|
endif
|