Do better with checking the changelog
Before, this could fail without a message if there was a changelog but
no matching line.
Also change the changelog format
== Release v0.0.1
to
== Release 0.0.1
This commit is contained in:
1 parent
8b783af832
commit
f842b22eb8
1 file changed
+6
-7
+6
-7
@@ -33,10 +33,9 @@ build() {
|
|||||||
cd $RELEASE_DIR
|
cd $RELEASE_DIR
|
||||||
|
|
||||||
## Check that the top changelog entry is this version
|
## Check that the top changelog entry is this version
|
||||||
latest_changelog=$(grep -o "Release v.*" -m1 ./CHANGELOG.md)
|
if ! latest_changelog=$(grep -o "== Release [0-9].*" -m1 ./CHANGELOG.md) || \
|
||||||
if ! [ `echo "$latest_changelog" | grep -o 'v[^ ]*'` == $LATEST_TAG ]; then
|
! [ `echo "$latest_changelog" | grep -o '[0-9][^ ]*'` == "$VERSION" ]; then
|
||||||
echo -e "\u2757 Latest changelog entry $latest_changelog does not match" >&2
|
echo -e "\u2757 Latest changelog entry \"$latest_changelog\" does not match the release version $VERSION" >&2
|
||||||
echo "the latest tag $LATEST_TAG" >&2
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -61,9 +60,9 @@ build() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## Run tests with the distributables, including version check
|
## Run tests with the distributables, including version check
|
||||||
v=$(./weaver/weaver --version)
|
v=$(./weaver/weaver --version | grep -o '[0-9].*')
|
||||||
if ! [ "$v" == "weaver $VERSION" ]; then
|
if ! [ "$v" == "$VERSION" ]; then
|
||||||
echo "Version of distributable "$v" does not match tag $LATEST_TAG" >&2
|
echo "Version of distributable "$v" does not match release version $VERSION" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user