From 49f5baabbbd050fd4e8ec3821a56b64778fce7a3 Mon Sep 17 00:00:00 2001 From: LaMat <65860122+lamat1111@users.noreply.github.com> Date: Mon, 27 May 2024 14:45:41 +0200 Subject: [PATCH] Update update.sh Added command to extract the version number automatically (taken from release_autorun.sh). Untested, not sure if it can work here as well. --- update.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/update.sh b/update.sh index 96b7152..873723d 100644 --- a/update.sh +++ b/update.sh @@ -7,9 +7,6 @@ echo "The script is prepared for Ubuntu machines. If you are using another opera echo "⏳Processing..." sleep 10 # Add a 10-second delay -# Set the version number -VERSION="1.4.18" - # Step 0.1: Check for updates echo "⏳ Checking for updates..." cd ~/ceremonyclient @@ -29,9 +26,12 @@ fi service ceremonyclient stop # Step 1:Download Binary -echo "⏳ Downloading New Release $VERSION" -git checkout release +echo "⏳ Downloading new release..." +git pull # Fetch and merge the latest changes from the remote repository +git checkout release # Checkout the release branch +# Extract the version number from config/version.go +VERSION=$(grep -A 1 "func GetVersion() \[\]byte {" config/version.go | grep -Eo '0x[0-9a-fA-F]+' | xargs printf "%d.%d.%d") # Get the system architecture ARCH=$(uname -m)