From 106c74783a04dd72796180ab96ca4ed017effd66 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Mon, 16 Jan 2012 09:40:13 +0100
Subject: [PATCH] Update git repository each time

---
 software/erp5/software.cfg | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/software/erp5/software.cfg b/software/erp5/software.cfg
index 1e5003349..7bec91640 100644
--- a/software/erp5/software.cfg
+++ b/software/erp5/software.cfg
@@ -33,8 +33,9 @@ repository = https://saneftestbot:kucahS5oav6jahch@git.erp5.org/repos/slapos/san
 branch = deployment_generic_CR1094
 # Note: GIT_SSL_NO_VERIFY is used as SlapOS OpenSSL configuration does not
 # contain master certificates to verify.
-command = (GIT_SSL_NO_VERIFY=1 ${git:location}/bin/git clone --quiet -b ${:branch} ${:repository} ${:location}) || (rm -fr ${:location} && exit 1) 
-update-command = 
+revision =
+command = (GIT_SSL_NO_VERIFY=1 ${git:location}/bin/git clone --quiet -b ${:branch} ${:repository} ${:location}) && if [ -n ${:revision} ]; then cd ${:location} && (GIT_SSL_NO_VERIFY=1 ${git:location}/bin/git reset --quiet --hard ${:revision}) ; fi
+update-command = cd ${:location} && (GIT_SSL_NO_VERIFY=1 ${git:location}/bin/git pull --quiet) && if [ -n ${:revision} ]; then cd ${:location} && (GIT_SSL_NO_VERIFY=1 ${git:location}/bin/git reset --quiet --hard ${:revision}) ; fi
 
 [check-recipe]
 recipe = plone.recipe.command
-- 
2.30.9