Skip to content

Commit

Permalink
Added check for a clean git state before publishing a new server
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiaswking committed Jul 13, 2018
1 parent 88e116c commit 5fa4809
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

set -e

function check_git_status {
VALUE=$(git ls-files -m)
if [ ! "$VALUE" == "" ]; then
echo "YOU HAVE \033[0;31mUNCOMMITTED CHANGES\033[0m!"
exit 1
fi
}
check_git_status


SRC_REPOSITORY="extender/extender:latest"
VERSION=$(date "+%Y%m%d_%H%M")
DEST_REPOSITORY="378120250811.dkr.ecr.eu-west-1.amazonaws.com/extender:$VERSION"
Expand Down

0 comments on commit 5fa4809

Please sign in to comment.