I'm using git bisect to find out a version in which the VERSION file has changed from 0.0.1_testing to newer version and I want to use bisect run
like this.
git bisect run sh -c 'if [ "$(cat VERSION)" == "0.0.1_testing" ] ; then exit 0 ; else exit 1 ; fi'
But I keep getting bad result and this error sh: 1: [: 0.1.0: unexpected operator
(0.1.0 is
returned by "$(cat VERSION)"
. I assume that this is because when the subshell exits, bisect uses its exit value and doesn't even go through rest of the script.
Is there a way how to make this work? Or some good alternative? I know I could use other tools than bisect, but I'd really like to do it this way.