Skip to content

Commit

Permalink
fix for brew style and audit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
carmal891 committed Sep 24, 2024
1 parent 1423d37 commit 4e324e7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
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"
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v1
uses: actions/cache@v4.0.2
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
Expand Down
36 changes: 20 additions & 16 deletions Formula/pvsadm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,34 @@ class Pvsadm < Formula
homepage "https://github.com/ppc64le-cloud/pvsadm"
license "Apache-2.0"

if OS.mac?
if Hardware::CPU.intel?
require_relative "pvsadm_darwin_amd64"
PvsadmDarwinAmd64.new
elsif Hardware::CPU.arm?
require_relative "pvsadm_darwin_arm64"
PvsadmDarwinArm64.new
end
elsif OS.linux?
if Hardware::CPU.intel?
require_relative "pvsadm_linux_amd64"
PvsadmLinuxAmd64.new
def initialize
super()

Check failure on line 7 in Formula/pvsadm.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Style/SuperArguments: Call `super` without arguments and parentheses when the signature is identical.
@formula = nil

if OS.mac?
if Hardware::CPU.intel?
require_relative "pvsadm_darwin_amd64"
@formula = PvsadmDarwinAmd64.new
elsif Hardware::CPU.arm?
require_relative "pvsadm_darwin_arm64"
@formula = PvsadmDarwinArm64.new
end
elsif OS.linux?
if Hardware::CPU.intel?
require_relative "pvsadm_linux_amd64"
@formula = PvsadmLinuxAmd64.new
end
end

raise "Unsupported platform" if @formula.nil?
end

def install
raise "Unsupported platform" unless defined? @formula

@formula.install
end

test do
raise "Unsupported platform" unless defined? @formula

@formula.test
end
end

Check failure on line 36 in Formula/pvsadm.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Layout/TrailingEmptyLines: 1 trailing blank lines detected.

0 comments on commit 4e324e7

Please sign in to comment.