From: Dan Vanderkam Date: Tue, 13 Aug 2013 20:09:06 +0000 (-0400) Subject: ready for release! X-Git-Tag: v1.0.0~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=806e1ea5f693c8e0788094faf0d2029a1fa8c836;p=dygraphs.git ready for release! --- diff --git a/generate-combined.sh b/generate-combined.sh index 4d062aa..9e184ae 100755 --- a/generate-combined.sh +++ b/generate-combined.sh @@ -55,8 +55,8 @@ compress*|cat_compress*) CatCompressed ;; update) - CatCompressed > dygraph-min.js - chmod a+r dygraph-min.js + CatCompressed > dygraph-combined.js + chmod a+r dygraph-combined.js ;; *) echo >&2 "Unknown action '$ACTION'" diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..84fd072 --- /dev/null +++ b/release.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# This script "releases" a version of dygraphs. + +if [ $# -ne 1 ]; then + echo "Usage: $0 X.Y.Z" >&2 + exit 1 +fi + +VERSION=$1 +echo $VERSION | egrep '\d+\.\d+\.\d+' > /dev/null +if [ $? -ne 0 ]; then + echo "Version must be of the form 1.2.3 (got '$VERSION')" >&2 + exit 1 +fi + +# Make sure this is being run from a release branch with the correct name. +branch=$(git rev-parse --abbrev-ref HEAD) +if [ $branch != "release-$VERSION" ]; then + echo "Must be on a branch named 'release-$VERSION' (found '$branch')" >&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! +echo "Pushing docs and generated files to dygraphs.com/$VERSION" +./push-to-web.sh dygraphs.com:dygraphs.com/$VERSION +if [ $? -ne 0 ]; then + echo "Push to web failed" >&2 + exit 1 +fi + +# 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 push + +echo "Release was successful!" +echo "Don't forget to merge changes on this branch back into master." diff --git a/releases.json b/releases.json index 37c18af..86a0aaa 100644 --- a/releases.json +++ b/releases.json @@ -2,7 +2,7 @@ { "version": "1.0.0", "files": [ - "dygraph.min.js" + "dygraph-combined.js" ] } ]