From b8113d285cf9323b75d7a345bee6a9879434147f Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Sat, 14 Mar 2015 01:08:36 +0100 Subject: [PATCH] Finalize test-deploy makefile --- Makefile | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a6cd8f1b..e9b4094d 100644 --- a/Makefile +++ b/Makefile @@ -42,5 +42,24 @@ clean_virtualenv: rm -rf virtualenv/ - +TEST_USER=${USER} +TEST_SERVER=atrey.karlin.mff.cuni.cz +TEST_DIR=/akce/MaM/MaMweb/test/ + +# remote commands +HEAD=`git log --color=never |head -1|sed 's/.*commit //'` +push_test: + @echo "Checking out commited HEAD (${HEAD}) state at ${TEST_SSH} ..." + git push --all + ssh ${TEST_USER}@${TEST_SERVER} -n -x "\ + cd ${TEST_DIR} && \ + git fetch --all && \ + git checkout ${HEAD} -f && \ + git clean -f && \ + cp mamweb/settings_test.py mamweb/settings.py && \ + make install && \ + ./manage.py migrate --noinput && \ + echo Done." + @echo "Test deployed at ${TEST_SERVER}:${TEST_DIR} successfully." +