Skip to content

Commit

Permalink
add: frobnicate
Browse files Browse the repository at this point in the history
  • Loading branch information
matanyall committed Jun 21, 2024
1 parent 91922f7 commit 36e41c5
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Formula/frobnicate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class Frobnicate < Formula
desc "Tool for interacting with Turbo Encabulators"
homepage "https://github.com/matanyall/frobnicate"

url "https://github.com/matanyall/frobnicate/releases/download/v0.1.0/frobnicate_v0.1.0_macos-14.pex"

version "0.1.0"
sha256 "a871d90c4ff2d86e6bfb1fe4233e94ac72d3b1d17adef18a0d8a185c7d2db530"
license ""
depends_on "[email protected]"

def install
pex_file = Dir.glob("frobnicate*.pex").first
bin.install pex_file => "frobnicate"
end

test do
system "#{bin}/frobnicate", "--help"
end
end
63 changes: 63 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: "3"

tasks:
test-setup:
cmds:
- brew test-bot --only-setup

test-only-cleanup-before:
cmds:
- brew test-bot --only-cleanup-before

test-only-tap-syntax:
cmds:
- brew test-bot --only-tap-syntax

test-only-formulae:
desc: Run brew test-bot command for formulae
cmds:
- brew test-bot --only-formulae

test:
desc: Run all the tests
deps:
- test-setup
- test-only-cleanup-before
- test-only-tap-syntax
- test-only-formulae

style-lint:
desc: Run brew style command
cmds:
- brew style .

# run the stle formatter on each file in the Formula directory
style-fix:
desc: Run brew style --fix command
cmds:
- brew style --formula --fix Formula/*.rb

install-local:
desc: Install the formula locally
cmds:
- brew install --verbose --formula Formula/frobnicate.rb

uninstall:
desc: Uninstall the formula
cmds:
- brew uninstall frobnicate

do:
desc: Run all the tests and style checks
deps:
- task: test-setup
- task: test-only-cleanup-before
- task: test-only-tap-syntax
- task: style-fix

test-install:
desc: Run all the tests and style checks
deps:
- task: uninstall
- task: install-local

2 changes: 2 additions & 0 deletions steps_output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Error: 1 failed step!
brew doctor

0 comments on commit 36e41c5

Please sign in to comment.