From: Nicolas CROUZET - SFME/LGLS Date: Tue, 23 Feb 2021 10:25:45 +0000 (+0100) Subject: spns #20662 : ne change plus la date du répertoire source pour les tag - seulement... X-Git-Tag: 5.8.0~4^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ff376045c9f8182e3d31b6c451b8451d881f7197;p=tools%2Fsat.git spns #20662 : ne change plus la date du répertoire source pour les tag - seulement pour les branches --- 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,