From ff376045c9f8182e3d31b6c451b8451d881f7197 Mon Sep 17 00:00:00 2001 From: Nicolas CROUZET - SFME/LGLS Date: Tue, 23 Feb 2021 11:25:45 +0100 Subject: [PATCH] =?utf8?q?spns=20#20662=20:=20ne=20change=20plus=20la=20da?= =?utf8?q?te=20du=20r=C3=A9pertoire=20source=20pour=20les=20tag=20-=20seul?= =?utf8?q?ement=20pour=20les=20branches?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/system.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/system.py b/src/system.py index 51bb811..4bfb95a 100644 --- a/src/system.py +++ b/src/system.py @@ -107,12 +107,16 @@ touch -d "$(git --git-dir=%(where_git)s log -1 --format=date_format)" %(where)s if src.architecture.is_windows(): cmd = "rmdir %(where)s && git clone %(git_options)s %(remote)s %(where)s && git --git-dir=%(where_git)s --work-tree=%(where)s checkout %(tag)s" else: +# for sat compile --update : changes the date of directory, only for branches, not tag cmd = r""" set -x rmdir %(where)s git clone %(git_options)s %(remote)s %(where)s && \ -git --git-dir=%(where_git)s --work-tree=%(where)s checkout %(tag)s && \ -touch -d "$(git --git-dir=%(where_git)s log -1 --format=date_format)" %(where)s +git --git-dir=%(where_git)s --work-tree=%(where)s checkout %(tag)s +res=$? +git --git-dir=%(where_git)s status|grep HEAD +if [ $? -ne 0 ]; then touch -d "$(git --git-dir=%(where_git)s log -1 --format=date_format)" %(where)s;fi +return $res """ cmd = cmd % {'git_options': git_options, 'remote': from_what, -- 2.39.2