Skip to content

Commit

Permalink
brew style
Browse files Browse the repository at this point in the history
  • Loading branch information
froch committed Jul 2, 2024
1 parent 7d2c225 commit 2c0f826
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Homebrew
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
12 changes: 7 additions & 5 deletions lib/base.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 2c0f826

Please sign in to comment.