#!/usr/bin/env bash
# Commit logs/DATE/ and push to origin.
set -euo pipefail
cd "$(dirname "$0")/.."
. bin/lib.sh

git add "$LOGDIR"
if git diff --cached --quiet; then
    echo "no new logs to commit"
    exit 0
fi
git commit -m "Release $DATE: build and push logs"
git push origin HEAD
