#!/bin/sh
#
# Ran before git flow release start
#
# Positional arguments:
# $1    The version (including the version prefix)
# $2    The origin remote
# $3    The full branch name (including the release prefix)
# $4    The base from which this release is started
#
VERSION=$1
ORIGIN=$2
BRANCH=$3
BASE=$4

# Implement your script here.
ROOTDIR=$(git rev-parse --show-toplevel)

sed -i 's/^Version:.*/Version: '$VERSION'/' $ROOTDIR/style.css
git commit -a -m "Version bump $VERSION"

# To terminate the git-flow action, return a non-zero exit code.
exit 0