Skip to content

Commit

Permalink
ci(auto-update): make use of hash in release download
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgomesdev committed Dec 22, 2023
1 parent 9f1a513 commit 7231a6a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/scripts/auto-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ download_latest () {
arch=$(dpkg --print-architecture | xargs echo -n)

mkdir -p target/release || exit 1
wget -q "$REPO_URL/releases/latest/download/server-$arch" -O target/release/rusty_controller || exit 1
chmod +x target/release/rusty_controller || exit 1
wget -q "$REPO_URL/releases/latest/download/server-$arch" -O "$BINARY_PATH" || exit 1
chmod +x "$BINARY_PATH" || exit 1

newest_hash=$(sha256sum "$BINARY_PATH" | gawk '{print $1}')

echo "$INFO* Downloaded latest release binary!$RESET"
}
Expand Down

0 comments on commit 7231a6a

Please sign in to comment.