paper.js/build/publish.sh

53 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
# http://paperjs.org/
#
2014-01-03 19:47:16 -05:00
# Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
# http://scratchdisk.com/ & http://jonathanpuckey.com/
#
# Distributed under the MIT license. See LICENSE file for details.
#
# All rights reserved.
# 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`
2014-03-13 12:48:12 -04:00
DIST_FILE=content/11-Download/paperjs-v$VERSION.zip # Relative to $SITE_DIR
2013-12-02 04:00:44 -05:00
cd $PAPER_DIR/build
./dist.sh
2013-12-02 04:08:18 -05:00
cd $PAPER_DIR
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
2013-06-27 03:35:54 -04:00
git commit -m "Bump version to v$VERSION"
# Tag
git tag "v$VERSION"
2013-06-27 03:35:54 -04:00
# Push
git push --follow-tags
2013-06-27 03:35:54 -04:00
# 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 --follow-tags
cd "$PAPER_DIR/build"