From 1b8328b941af5adc94b688d62da4ccac96b8eca2 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Fri, 27 Apr 2018 16:28:28 +0300 Subject: [PATCH] Deploy script fix (#62) * Deploy fix * Bootstrap update --- Makefile | 5 ++++- tests/phpunit/bootstrap.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 042da3c..60c1309 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,14 @@ svn_clone: svn co $(SVNREPOURL) /tmp/svn_plugin_dir --username $(USERNAME) --password $(PASSWORD) --no-auth-cache prepare: /tmp/svn_plugin_dir - svn copy /tmp/svn_plugin_dir/trunk /tmp/svn_plugin_dir/tags/$(VERSION) --username $(USERNAME) --password $(PASSWORD) --no-auth-cache + 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_commit: /tmp/svn_plugin_dir/tags + 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 remove_dir: diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index 8559e88..fa86a7d 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -9,7 +9,7 @@ if (!$_tests_dir) { require_once $_tests_dir . '/includes/functions.php'; function _manually_load_plugin() { - $plugin_dir = dirname( dirname( dirname( __FILE__ ) ) ) . '/'; + $plugin_dir = dirname(dirname(dirname(__FILE__))) . '/'; require $plugin_dir . 'src/include/class-wc-retailcrm-orders.php'; require $plugin_dir . 'src/include/class-wc-retailcrm-customers.php'; @@ -21,7 +21,7 @@ tests_add_filter('muplugins_loaded', '_manually_load_plugin'); require '/tmp/woocommerce/tests/bootstrap.php'; -$plugin_dir = dirname( dirname( dirname( __FILE__ ) ) ) . '/'; +$plugin_dir = dirname(dirname(dirname(__FILE__))) . '/'; // helpers require $plugin_dir . 'tests/helpers/class-wc-retailcrm-response-helper.php'; require $plugin_dir . 'tests/helpers/class-wc-retailcrm-test-case-helper.php';