Skip to content

Commit

Permalink
perf(Travis): display timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnymillergh committed Oct 26, 2020
1 parent cf8f4ca commit 037e9b1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
# https://stackoverflow.com/questions/19622198/what-does-set-e-mean-in-a-bash-script
set -e

function now() {
echo date +%Y-%m-%d' '%H:%M:%S.%N | cut -b 1-23
return 0
}

CURRENT_DIR=$(pwd)
echo "[INSTALL] INFO CURRENT_DIR: $CURRENT_DIR"
echo "$(now) INFO --- [INSTALL] CURRENT_DIR: $CURRENT_DIR"
command "ls"

# Run the Maven clean install
Expand All @@ -14,8 +19,8 @@ command "ls"
INSTALL_COMMAND_RESULT=$?

if [ "$INSTALL_COMMAND_RESULT" -eq 0 ]; then
echo "[INSTALL] INFO Installation succeed. INSTALL_COMMAND_RESULT: $INSTALL_COMMAND_RESULT"
echo "$(now) INFO --- [INSTALL] Installation succeed. INSTALL_COMMAND_RESULT: $INSTALL_COMMAND_RESULT"
else
echo "[INSTALL] INFO Installation failed. INSTALL_COMMAND_RESULT: $INSTALL_COMMAND_RESULT" >&2
echo "$(now) INFO --- [INSTALL] Installation failed. INSTALL_COMMAND_RESULT: $INSTALL_COMMAND_RESULT" >&2
exit 1
fi

0 comments on commit 037e9b1

Please sign in to comment.