From 2d38c9220d7b4bfe678d942087073fd916ae43a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 28 Nov 2013 22:18:43 +0100 Subject: [PATCH] Improve build script to include dist file in paperjs.org website. --- build/publish.sh | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/build/publish.sh b/build/publish.sh index 2f3a8b7a..6fa6a3ce 100755 --- a/build/publish.sh +++ b/build/publish.sh @@ -10,17 +10,24 @@ # # All rights reserved. -./dist.sh -echo "Commiting Version" -# Add changed json configuration files -git add -u ../package.json -git add -u ../bower.json -# Add all changed files in dist -git add -u ../dist # Extract the paper.js version from package.json: VERSION=$(node -e " process.stdout.write(require('../package.json').version) ") +cd .. +PAPER_DIR=`PWD` +cd ../paperjs.org +SITE_DIR=`PWD` +DIST_FILE=content/10-Download/paperjs-v$VERSION.zip # Relative to $SITE_DIR + +cd $PAPER_DIR +build/dist.sh +echo "Commiting Version" +# Add changed json configuration files +git add -u package.json +git add -u bower.json +# Add all changed files in dist +git add -u dist # Commit git commit -m "Bump version to v$VERSION" # Tag @@ -29,3 +36,16 @@ git tag "v$VERSION" git push --tags # Publish npm publish .. + +# Copy paperjs.zip to the website's download folder +cd $SITE_DIR +echo `PWD` +cp $PAPER_DIR/dist/paperjs.zip $DIST_FILE +# Commit to paperjs.org +git add -A $DIST_FILE +git commit -m "Release version v$VERSION" +# Tag +git tag "v$VERSION" +git push --tags + +cd "$PAPER_DIR/build"