Skip to content

Commit

Permalink
installation scripts (#232)
Browse files Browse the repository at this point in the history
* installation scripts

* adding brew file
  • Loading branch information
vaibhawvipul authored Mar 4, 2024
1 parent c18cff1 commit 7d114df
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
18 changes: 18 additions & 0 deletions installation/brew/Formula/resonate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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

def install
ENV["GOPATH"] = buildpath
system "go", "get", "-u", "github.com/resonatehq/resonate"
system "go", "build", "-o", bin/"resonate", "github.com/resonatehq/resonate"
end

test do
assert_match "Usage:", shell_output("#{bin}/resonatehq --help")
end
end
27 changes: 27 additions & 0 deletions installation/linux/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Set the version you want to install
RES_VERSION="v0.2.0"

# Set the installation directory
INSTALL_DIR="/usr/local/bin"

# URL for the Resonate release tarball
RES_URL="https://github.com/resonatehq/resonate/releases/download/${RES_VERSION}/resonate-linux-amd64"

# Temporary directory for downloading
TMP_DIR=$(mktemp -d)

# Download Resonate binary
echo "Downloading Resonate ${RES_VERSION}..."
curl -L -o "${TMP_DIR}/resonate" "${RES_URL}"

# Install Resonate binary
echo "Installing Resonate to ${INSTALL_DIR}..."
sudo install "${TMP_DIR}/resonate" "${INSTALL_DIR}"

# Cleanup
echo "Cleaning up..."
rm -rf "${TMP_DIR}"

echo "Resonate ${RES_VERSION} has been installed!"

0 comments on commit 7d114df

Please sign in to comment.