From b546a9c96c7c919db18b8be232a7be1da1b1d897 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Wed, 20 Mar 2019 15:56:37 +0300 Subject: [PATCH] update Makefile --- Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 60c1309..59a6dd0 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,22 @@ FILE = $(TRAVIS_BUILD_DIR)/VERSION VERSION = `cat $(FILE)` -all: svn_clone prepare svn_commit remove_dir +all: svn_clone svn_push remove_dir svn_clone: mkdir /tmp/svn_plugin_dir svn co $(SVNREPOURL) /tmp/svn_plugin_dir --username $(USERNAME) --password $(PASSWORD) --no-auth-cache -prepare: /tmp/svn_plugin_dir - 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 +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