Permalink
Browse files

hack up scripts/fixed_in_version to be a _bit_ better...

  • Loading branch information...
1 parent 1fb22c4 commit 29cc78d51a8ab2abf3706b77659fcf3709f491e7 @gregkh committed Aug 22, 2016
Showing with 14 additions and 3 deletions.
  1. +14 −3 scripts/fixed_in_version
View
17 scripts/fixed_in_version
@@ -12,14 +12,25 @@ txtcyn=$(tput setaf 6) # Cyan
txtwht=$(tput setaf 7) # White
txtrst=$(tput sgr0) # Text reset
+fixes=`cat - | grep -i "fixes:" | head -n 1`
+if [[ ${fixes} =~ [[:xdigit:]]{12} ]] ; then
+ id=${BASH_REMATCH}
+else
+ echo "${txtred}try 2${txtrst}"
+ id=`echo ${fixes} | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' | sed -e 's/^[ \t]*//' | cut -f 1 -d ' '`
+fi
+
+echo "${txtylw}id: '$id'${txtrst}"
+
#COMMIT_ID=`cat - | ~/bin/get_commit_id.sh`
#COMMIT_ID=`cat - | grep -i "fixes:" | head -n 1 | sed -s 's/ //g' | cut -f 2 -d ':'`
#COMMIT_ID=`cat - | grep -i "fixes:" | head -n 1 | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' | cut -f 1 -d ' '`
-COMMIT_ID=`cat - | grep -i "fixes:" | head -n 1 | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' | sed -e 's/^[ \t]*//' | cut -f 1 -d ' '`
+#COMMIT_ID=`cat - | grep -i "fixes:" | head -n 1 | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' | sed -e 's/^[ \t]*//' | cut -f 1 -d ' '`
#echo "$COMMIT_ID"
#exit
-echo "${txtylw}fixes: '${COMMIT_ID}'${txtrst}"
+#echo "${txtylw}fixes: '${COMMIT_ID}'${txtrst}"
-git describe --contains ${COMMIT_ID}
+#git describe --contains ${COMMIT_ID}
+git describe --contains ${id}

0 comments on commit 29cc78d

Please sign in to comment.