kalidea/kaligraphi

View on GitHub
scripts/patch

Summary

Maintainability
Test Coverage
#!/bin/bash

if ! git checkout master
then
  echo "[ERR] can't checkout master"
  exit 1
fi

CHANGED=$(git diff-index --name-only HEAD --)
if [ -n "$CHANGED" ]; then
  echo "[ERR] your local version has unstashed changes"
  echo $CHANGED
  exit 1
fi

#### patch version ####
echo "going to lib dir"
cd ./projects/kalidea/kaligraphi  || exit

echo "update version"
version=`npm version patch`

echo "commit files"
git add .
git commit -m "version $version"

echo "push to master"
git push

echo "add tag"
git tag $version
git push --tags