From 5e9e061e4f131e17e1697501e47f7766c93a43a9 Mon Sep 17 00:00:00 2001 From: Jacob Kiers Date: Thu, 25 Sep 2014 09:47:21 +0200 Subject: [PATCH] Make sure the repo is clean before releasing. Signed-off-by: Jacob Kiers --- bin/release | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/release b/bin/release index 63262eb..d0aff23 100755 --- a/bin/release +++ b/bin/release @@ -32,6 +32,17 @@ if [ "$1" == "" ]; then exit 1 fi +git pull + +# Make sure all changes are merged. +if [ $? -ne 0 ]; then + error "Branch did not contain the latest changes and could not be merged automatically." + echo "Please merge by hand before continue." + echo + git status + exit 1 +fi + # Dirty repo? if [ "$(git status --porcelain 2>/dev/null)" ]; then error "Repo is dirty."