#!/bin/bash

# Prepare
export FORCE_COLOR=true
set -e

# Prepare pathes
SELF=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

echo "Tagging release"
npm version ${1:-patch}

echo "Push to git"
git push

echo "Publish to npm"
npm publish

echo "Push tags to git"
git push --tags
