#!/bin/bash set -x # 'latest' is a git tag that we recreate every time we release a new # version. If the VERSION file has changed since `latest` then we release a # new version. git pull --tags if git diff --name-only HEAD latest -- VERSION | egrep -q .; then # The VERSION file changed since 'latest', build the gem and push gem build *.gemspec gem push *.gem git tag -f latest HEAD git tag -f "v$(cat VERSION)" git push -f origin latest git push --tags fi