Skip to content

Commit

Permalink
Latest version for installation (#265)
Browse files Browse the repository at this point in the history
* using latest release tag

* latest version for curl linux install
  • Loading branch information
vaibhawvipul authored Mar 27, 2024
1 parent 4c1b89c commit 7935e1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion installation/brew/Formula/resonate.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion installation/linux/install.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 7935e1c

Please sign in to comment.