#!/bin/bash set -e repo=$1 start=$2 release=$3 pushd $repo >/dev/null commits=$(git --no-pager log --oneline --no-merges --no-decorate --reverse ${start}..HEAD | awk '{print $1}') for i in $commits; do echo ========================================================== echo "=> $(git --no-pager log -n1 --format='%h %s' $i)" ucommit=$(git --no-pager log --format=%B -n 1 $i | grep -m2 "commit " | \ awk '/commit/{i++}i==1{print $2;exit}') ycommit=$(~/g/kerneloscope/client/kerneloscope downstream -t ${release} $ucommit | awk '{print $1}') yjira=$(git --no-pager log --format=%B -n1 $ycommit | awk '/JIRA/{print $2; exit}') cve=$(git --no-pager log --format=%B -n1 $ycommit | awk '/CVE/{print $2; exit}') echo echo "Y-JIRA: $yjira" test -z $cve || echo "CVE: $cve" echo "Y-Commit: $(git --no-pager log --format=%H -n1 $ycommit)" echo echo "O-JIRA: $yjira" echo done popd >/dev/null