Skip to content

Commit

Permalink
chore: Update resource provider updater script
Browse files Browse the repository at this point in the history
  • Loading branch information
bgins committed Jul 3, 2024
1 parent 5174714 commit 9b46635
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ops/lilypad-updater.sh → ops/lilypad-updater-gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OSNAME=$(uname -s | awk '{if ($1 == "Darwin") print "darwin"; else if ($1 == "Li
export OSNAME

# Get the latest version URL
LATEST_URL=$(curl -s https://api.github.com/repos/lilypad-tech/lilypad/releases/latest | grep "browser_download_url.*lilypad-$OSNAME-$OSARCH" | cut -d : -f 2,3 | tr -d \")
LATEST_URL=$(curl -s https://api.github.com/repos/lilypad-tech/lilypad/releases/latest | grep "browser_download_url.*lilypad-$OSNAME-$OSARCH-gpu" | cut -d : -f 2,3 | tr -d \")

# Extract the latest version (including short SHA) from the URL
LATEST_VERSION=$(echo $LATEST_URL | sed -n 's#.*/download/\([^/]*\)/.*#\1#p')
Expand All @@ -24,18 +24,18 @@ if [ "$CURRENT_VERSION" != "$LATEST_VERSION" ]; then
echo "Updating lilypad binary from version $CURRENT_VERSION to $LATEST_VERSION"
sudo systemctl stop lilypad-resource-provider
echo "Stopped the service: sudo systemctl stop lilypad-resource-provider"

curl -L -o lilypad "$LATEST_URL"
echo "Downloaded the latest version from $LATEST_URL"

chmod +x lilypad
sudo mv lilypad /usr/local/bin/lilypad
echo "Made the new binary executable and moved it to /usr/local/bin/lilypad"

sudo systemctl start lilypad-resource-provider
echo "Restarted the service: sudo systemctl start lilypad-resource-provider"

echo "Update complete."
else
echo "Lilypad binary is already up to date."
fi
fi

0 comments on commit 9b46635

Please sign in to comment.