technekes/nib

View on GitHub
bin/release

Summary

Maintainability
Test Coverage
#! /bin/sh

# update commands document
docker run \
  --rm \
  -v $PWD:/usr/src/app \
  -w /usr/src/app \
  ruby:alpine bin/update_docs

# fail release if commands changed (need to commit first)
if [[ $(git status | grep docs/commands.md) ]]; then
  echo "ERROR:

The commands document (docs/commands.md) has been updated. \
Please commit the changes and try again."

  exit 1
fi

NIB_VERSION=$(cat VERSION)
LATEST="$(
  curl --silent https://raw.githubusercontent.com/technekes/nib/master/VERSION
)"

if [[ $(git status | grep VERSION) ]]; then
  # fail release if VERSION file changed but not committed
  echo "ERROR:

The VERSION file has changed but not been committed. \
Please commit the changes and try again."

  exit 1
fi

rake release