diff --git a/test/check_release b/test/check_release index fd1dbcaa4..4aef69a03 100755 --- a/test/check_release +++ b/test/check_release @@ -12,6 +12,17 @@ then fail "There are uncommitted changes" fi +version=${current#v} +if ! grep "Version:" ShellCheck.cabal | grep -qFw "$version" +then + fail "The cabal file does not match tag version $version" +fi + +if ! grep -qF "## $current" CHANGELOG.md +then + fail "CHANGELOG.md does not contain '## $current'" +fi + current=$(git tag --points-at) if [[ -z "$current" ]] then @@ -34,17 +45,6 @@ then fail "You are not on master" fi -version=${current#v} -if ! grep "Version:" ShellCheck.cabal | grep -qFw "$version" -then - fail "The cabal file does not match tag version $version" -fi - -if ! grep -qF "## $current" CHANGELOG.md -then - fail "CHANGELOG.md does not contain '## $current'" -fi - if [[ $(git log -1 --pretty=%B) != "Stable version "* ]] then fail "Expected git log message to be 'Stable version ...'"