Skip to content

Commit

Permalink
Check source details before git details
Browse files Browse the repository at this point in the history
  • Loading branch information
koalaman committed Mar 8, 2024
1 parent 94214ee commit 50db9a2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/check_release
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ...'"
Expand Down

0 comments on commit 50db9a2

Please sign in to comment.