diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 7eb9af6..afc8164 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -33,7 +33,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Homebrew run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9e2a27e..c865ef1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,7 +20,7 @@ jobs: HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ github.token }} HOMEBREW_GITHUB_PACKAGES_USER: ${{ github.actor }} PULL_REQUEST: ${{ github.event.pull_request.number }} - run: brew pr-pull --debug --tap=$GITHUB_REPOSITORY $PULL_REQUEST + run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" - name: Push commits uses: Homebrew/actions/git-try-push@master @@ -32,4 +32,4 @@ jobs: if: github.event.pull_request.head.repo.fork == false env: BRANCH: ${{ github.event.pull_request.head.ref }} - run: git push --delete origin $BRANCH + run: git push --delete origin "$BRANCH" diff --git a/lib/base.rb b/lib/base.rb index 5659376..bffe88c 100644 --- a/lib/base.rb +++ b/lib/base.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "macho" # Ensure ruby-macho is required + class XiondBase < Formula desc "Generalized Blockchain Abstraction Layer" homepage "https://xion.burnt.com" @@ -61,7 +63,7 @@ def verify_checksum(file) def install_libwasmvm libwasmvm_suffix = determine_libwasmvm_suffix libwasmvm_file = "#{buildpath}/libwasmvm.#{libwasmvm_suffix}" - + lib.install libwasmvm_file end @@ -73,10 +75,10 @@ def compile_and_install_xiond system "make", "install" bin.install "#{ENV.fetch("GOPATH", nil)}/bin/xiond" - - if OS.mac? - system "install_name_tool", "-add_rpath", HOMEBREW_PREFIX/"lib", "#{bin}/xiond" - end + + return unless OS.mac? + + MachO::Tools.add_rpath("#{bin}/xiond", "#{HOMEBREW_PREFIX}/lib") end def determine_libwasmvm_suffix