Skip to content

Commit

Permalink
ci: add date log and remove redundant step
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgomesdev committed Dec 26, 2023
1 parent 124c146 commit 934c849
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions server/scripts/auto-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ while getopts "blh" opt; do
esac
done

echo "$START* Updating server$RESET"
echo "$START* Updating server at $(date)$RESET"

cd "$HOME" || exit 1

Expand Down Expand Up @@ -109,19 +109,14 @@ if [[ ! -d "$RUSTY_HOME_DIR" ]]; then

update
launch

echo "$START* Finished installing at $(date)$RESET"
exit 0
fi

cd "$RUSTY_HOME_DIR" || exit 1

if [[ -f "$HASH_FILE" ]]; then
if [ ! -f "$BINARY_PATH" ]; then
echo "$INFO* Binary not found...$RESET"
update
launch
exit 0
fi

current_hash=$(cat "$HASH_FILE")
update
if [[ "$current_hash" != "$newest_hash" ]]; then
Expand All @@ -142,3 +137,5 @@ else
update
launch
fi

echo "$START* Finished auto-update at $(date)$RESET"

0 comments on commit 934c849

Please sign in to comment.