Skip to content

Commit

Permalink
feat(setup): Disambiguate setup skip message
Browse files Browse the repository at this point in the history
Closes #797
  • Loading branch information
antoineco committed Dec 6, 2022
1 parent f52c2de commit 58a77fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ roles_files=(
# --------------------------------------------------------


echo "-------- $(date) --------"
echo "-------- $(date --rfc-3339=seconds) --------"

state_file="${BASH_SOURCE[0]%/*}"/state/.done
if [[ -e "$state_file" ]]; then
log "State file exists at '${state_file}', skipping setup"
declare state_birthtime
state_birthtime="$(stat -c '%Y' "$state_file")"
state_birthtime="$(date --rfc-3339=seconds --date="@${state_birthtime}")"

log "Setup has already run successfully on ${state_birthtime}. Skipping"
exit 0
fi

Expand Down

0 comments on commit 58a77fc

Please sign in to comment.