Salome HOME
spns #20662 : ne change plus la date du répertoire source pour les tag - seulement...
authorNicolas CROUZET - SFME/LGLS <crouzet@is228840.intra.cea.fr>
Tue, 23 Feb 2021 10:25:45 +0000 (11:25 +0100)
committerNicolas CROUZET - SFME/LGLS <crouzet@is228840.intra.cea.fr>
Tue, 23 Feb 2021 10:25:45 +0000 (11:25 +0100)
src/system.py

index 51bb81158f05c2a0a9d9d5942833fd6643e064a1..4bfb95aa6b64ad12dce9ddee87d18888e0af6875 100644 (file)
@@ -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,