X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=release.sh;h=21c0c34dcadab666382c16a923f8196cc1b0919b;hb=bfb3e0a44ba7eb76704389cd1515db9995944d41;hp=01089e4865deb5b17315bacb194f59568f74b386;hpb=00179556c038e85a6059c1393fcf2b72d1481414;p=dygraphs.git diff --git a/release.sh b/release.sh index 01089e4..21c0c34 100755 --- a/release.sh +++ b/release.sh @@ -26,11 +26,31 @@ if [ $? -ne 0 ]; then exit 1 fi +grep "$VERSION" package.json +if [ $? -ne 0 ]; then + echo "Version in package.json doesn't match command line argument." >&2 + exit 1 +fi + +grep "v$VERSION" bower.json +if [ $? -ne 0 ]; then + echo "Version in bower.json doesn't match command line argument." >&2 + exit 1 +fi + +grep "$VERSION" releases.json +if [ $? -ne 0 ]; then + echo "Version $VERSION does not appear in releases.json." >&2 + exit 1 +fi + +rm dygraph-combined.js # changes to this will make the tests fail. make lint test test-combined if [ $? -ne 0 ]; then echo "Tests failed. Won't release!" >&2 exit 1 fi +git reset --hard # make test-combined deletes the source map # Push a permanent copy of documentation & generated files to a versioned copy # of the site. This is where the downloadable files are generated.