Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 29 lines (24 sloc) 0.649 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/bin/sh

DIR=`dirname $0`
REL_VERSION=$1
CMDNAME=`basename $0`
if [ $# -ne 1 ]; then
  echo "usage: $CMDNAME rel_version" 1>&2
  exit 1
fi

IFS_BACKUP=$IFS
IFS='.'
set -- $REL_VERSION
MAJOR=$1
MINOR=$2
PATCH=`expr $3 + 1`
IFS=$IFS_BACKUP

PACKAGE_JSON=$DIR/package.json
QUNIT_TAP_JS=$DIR/lib/qunit-tap.js
PRE_VERSION="${MAJOR}.${MINOR}.${PATCH}pre"

cp ${PACKAGE_JSON} ${PACKAGE_JSON}.orig
cat ${PACKAGE_JSON}.orig | sed -e "s/$REL_VERSION/$PRE_VERSION/g" > ${PACKAGE_JSON}
rm ${PACKAGE_JSON}.orig

cp ${QUNIT_TAP_JS} ${QUNIT_TAP_JS}.orig
cat ${QUNIT_TAP_JS}.orig | sed -e "s/$REL_VERSION/$PRE_VERSION/g" > ${QUNIT_TAP_JS}
rm ${QUNIT_TAP_JS}.orig
Something went wrong with that request. Please try again.