#!/bin/bash
set -e # fail on error

if [ -f './version.txt' ]; then
    message=$(cat './version.txt')
else
    if [ -z "$1" ]; then
        message="$(annoy_the_fuck_out_of_commit_message_nerds)"
    else
        message="$*"
    fi
fi

git add .
git commit -m "$message"
git push