#! /bin/bash

#
# A simple script to create a Git tag. If no tag is supplied to it, it creates a one from the
# snapshot version.
#

# Get the directory from which this script is run
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

# Test if a tag is passed to this script
if [ -z "$1" ]; then
  VERSION="$($DIR/next_version)"
else
  VERSION="$1"
fi

$DIR/set_version "$VERSION"
