From 9bb6ec9ed7bad39073960e20fe5c4a735236fc70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 26 Jun 2013 19:42:04 -0700 Subject: [PATCH] Update build scripts to new approach for publishing. --- build/publish.sh | 28 ++++++++++++++++++++++++++++ build/zip.sh | 15 ++++++++------- 2 files changed, 36 insertions(+), 7 deletions(-) create mode 100755 build/publish.sh diff --git a/build/publish.sh b/build/publish.sh new file mode 100755 index 00000000..a8c09654 --- /dev/null +++ b/build/publish.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Paper.js - The Swiss Army Knife of Vector Graphics Scripting. +# http://paperjs.org/ +# +# Copyright (c) 2011 - 2013, Juerg Lehni & Jonathan Puckey +# http://lehni.org/ & http://jonathanpuckey.com/ +# +# Distributed under the MIT license. See LICENSE file for details. +# +# All rights reserved. + +echo "Building paper.js" +./build.sh +echo "Minifying paper.js" +./minify.sh +echo "Commiting Version" +# Add all changed files in dist +git add -u ../package.json +git add -u ../dist +# Extract the paper.js version from package.json: +VERSION=$(node -e " + process.stdout.write(require('../package.json').version) +") +# Commit +git commit -m "Update version to v$VERSION." +# Tag +git tag "v$VERSION" diff --git a/build/zip.sh b/build/zip.sh index acccc21a..e9d240c7 100755 --- a/build/zip.sh +++ b/build/zip.sh @@ -21,17 +21,18 @@ BASE=../.. # Copy license over cp $BASE/LICENSE.txt . # Make library folder and copy paper.js there -mkdir lib -cp $BASE/dist/paper.js lib -cp $BASE/dist/paper-min.js lib -cp $BASE/dist/paper-core.js lib -cp $BASE/dist/paper-core-min.js lib +mkdir dist +cp $BASE/dist/paper-full.js dist +cp $BASE/dist/paper-full.min.js dist +cp $BASE/dist/paper-core.js dist +cp $BASE/dist/paper-core.min.js dist # Also include stats sinsce some examples use it +mkdir lib cp $BASE/lib/stats.js lib # Copy examples over cp -r $BASE/examples . -# Replace ../../dist/ with ../../lib/ in each example -find examples -type f -print0 | xargs -0 perl -i -pe 's/\.\.\/\.\.\/dist\//\.\.\/\.\.\/lib\//g' +# Replace dist/paper.js with dist/paper-full.js in each example +find examples -type f -print0 | xargs -0 perl -i -pe 's/dist\/paper\.js/dist\/paper-full\.js/g' # Copy docs over cp -r $BASE/dist/docs . # Zip the whole thing