exit 1
fi
+git status | grep 'working directory clean' > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Must release with a clean working directory. Commit your changes." >&2
+ exit 1
+fi
+
+make lint test test-combined
+if [ $? -ne 0 ]; then
+ echo "Tests failed. Won't release!" >&2
+ exit 1
+fi
+
# Push a permanent copy of documentation & generated files to a versioned copy
# of the site. This is where the downloadable files are generated.
# TODO(danvk): make sure this actually generates the downloadable files!
# Everything is good. Tag this release and push it.
COMMIT=$(git rev-parse HEAD)
echo "Tagging commit $COMMIT as version $VERSION"
-git tag -m "Release of version $VERSION"
+git tag -a "v$VERSION" -m "Release of version $VERSION"
git push
echo "Release was successful!"