Created
June 20, 2019 17:36
-
-
Save JonnieCache/c3779fd1aed014913ee1a3a0b14b1aeb to your computer and use it in GitHub Desktop.
A script to automatically tag the latest working revision of FML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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