I’m trying to ‘git diff’ last commit PR in GH but the commit does not seem to be the correct one. So used the following:
echo "commit range: ${TRAVIS_COMMIT_RANGE}"
and I got:
commit range: 76acf3b3b213cd3f4f1e3a023e250ca23072fedd...474b7552e8a605b860df7b353dc8658d5025b0bf
So now I need to parse the above range to get only string like:
474b7552e8a605b860df7b353dc8658d5025b0bf
But when I do this in bash:
echo "commit range: ${TRAVIS_COMMIT_RANGE[-1]}"
I get:
: bad array subscript