From 7935e1cae3c90e04152d23f2170acdb101a73946 Mon Sep 17 00:00:00 2001 From: Vipul Vaibhaw Date: Wed, 27 Mar 2024 20:03:29 +0530 Subject: [PATCH] Latest version for installation (#265) * using latest release tag * latest version for curl linux install --- installation/brew/Formula/resonate.rb | 7 ++++++- installation/linux/install.sh | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/installation/brew/Formula/resonate.rb b/installation/brew/Formula/resonate.rb index 83039266..d80778b3 100644 --- a/installation/brew/Formula/resonate.rb +++ b/installation/brew/Formula/resonate.rb @@ -1,11 +1,16 @@ class Resonate < Formula desc "A dead simple programming model for modern applications" homepage "https://www.resonatehq.io/" - url "https://github.com/resonatehq/resonate/archive/refs/tags/v0.2.0.tar.gz" license "Apache-2.0" depends_on "go" => :build + # Fetch the latest release URL from GitHub Releases + latest_release_url = JSON.parse(`curl -s https://api.github.com/repos/resonatehq/resonate/releases/latest`)["tarball_url"] + + # Use the latest release URL in the formula + url latest_release_url + def install ENV["GOPATH"] = buildpath system "go", "get", "-u", "github.com/resonatehq/resonate" diff --git a/installation/linux/install.sh b/installation/linux/install.sh index faf39eb2..a61f4056 100644 --- a/installation/linux/install.sh +++ b/installation/linux/install.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the version you want to install -RES_VERSION="v0.2.0" +RES_VERSION=$(curl -s "https://api.github.com/repos/resonatehq/resonate/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') # Set the installation directory INSTALL_DIR="/usr/local/bin"