Skip to content

Instantly share code, notes, and snippets.

@JonnieCache
Created June 20, 2019 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonnieCache/c3779fd1aed014913ee1a3a0b14b1aeb to your computer and use it in GitHub Desktop.
Save JonnieCache/c3779fd1aed014913ee1a3a0b14b1aeb to your computer and use it in GitHub Desktop.
A script to automatically tag the latest working revision of FML
#!/usr/bin/env bash
set -e
VERSION=$(git -C /home/fml/fml.git log --notes=tinyci-result --format="%H %N" --reverse | grep success | tail -n1 | cut -f1 -d' ')
echo "new commit: $VERSION"
read -n1 -r -p "is this ok? "
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
fi
docker tag fml:$VERSION fml:production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment