Skip to content

Commit

Permalink
Minor updates to carriage returns
Browse files Browse the repository at this point in the history
Make output a bit more readable.
  • Loading branch information
pmuir committed Jun 25, 2016
1 parent c9d7468 commit d8350d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ git checkout $BRANCH &> $OUTPUT


function build() {
echo -e "### Updating git branch '$BRANCH'...\n"
echo -e "### Updating git branch '$BRANCH'..."
git pull origin $BRANCH &> $OUTPUT
SHA1="$(git log --pretty=format:'%h' -n 1)"
echo -e "### Fetched revision $SHA1\n"

echo -e "### Running Maven build...\n"
echo -e "### Running Maven build..."
mvn package &> $OUTPUT
cp target/ticket-monster.war misc/Dockerfiles/ticketmonster-ha/ticket-monster.war &> $OUTPUT
# Silently deploy/build in openshift
openshift &> $OUTPUT
echo -e "### Built ticket-monster.war using maven\n"

echo -e "### Build and deploy to production using ansible-container...\n"
echo -e "### Build and deploy to production using ansible-container..."
pushd misc/ &> $OUTPUT
docker run -it --rm -v $(pwd):/work/ -e DETACH=1 -e DOCKER_HOST dustymabe/ansible-container --debug run &> $OUTPUT
popd &> $OUTPUT

echo -e "### Brought up TicketMonster using ansible-container\n"
echo -e "### Brought up TicketMonster using ansible-container. Docker containers available are: \n"
docker ps --format "{{.ID}}\t{{.Status}}\t{{.Names}}"
}

Expand All @@ -48,12 +48,12 @@ function openshift() {
popd && rm -rf /tmp/demo/
}

echo -e "### Polling for updates to git..."
echo -ne "### Polling for updates in git repository..."
while true; do
git fetch &> build_log.txt
echo -n '.'
if [ -s build_log.txt ]; then
echo
echo -e "\n\n"
build
exit
fi
Expand Down

0 comments on commit d8350d2

Please sign in to comment.