mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 01:28:34 +08:00
Check source details before git details
This commit is contained in:
@@ -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 ...'"
|
||||
|
Reference in New Issue
Block a user