fix run git command error with --no-log in CentOS 7
authorJun Wang <junbill.wang@samsung.com>
Wed, 2 Mar 2016 13:46:00 +0000 (21:46 +0800)
committerJun Wang <junbill.wang@samsung.com>
Wed, 2 Mar 2016 13:46:19 +0000 (21:46 +0800)
Change-Id: I2cd0818b55020139b065d5d75736b24c15fe7112

cases/export/gbs_export_with_merge_commit_in_git-log.case

index 66eccf19de4531de57a286db4b7678697a20d47c..3d3b1eb9fe65a55bfa614a4d26e7546debd33b34 100644 (file)
@@ -30,7 +30,9 @@ git checkout master
 
 DIST=`python -c "import platform; print platform.dist()[0]"`
 
-if [ $DIST = centos ] || ([ $DIST = SuSE ] && [ `python -c "import platform;print platform.dist()[1]"` = 12.1 ]);then
+VERSION=`python -c "import platform;print platform.dist()[1]"`
+
+if ([ $DIST = centos ] && [ $VERSION < 7 ] ) || ([ $DIST = SuSE ] && [ $VERSION = 12.1 ]);then
     OPTION=--no-log
 else
     OPTION=--no-edit