Skip to content

Commit

Permalink
Merge pull request #191909 from Homebrew/git-recent-update-test
Browse files Browse the repository at this point in the history
git-recent: update test and rebottle for attestation
  • Loading branch information
BrewTestBot authored Sep 29, 2024
2 parents d368c43 + 42d4854 commit 02585ea
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Formula/g/git-recent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,29 @@ class GitRecent < Formula
license "MIT"

bottle do
sha256 cellar: :any_skip_relocation, all: "99a91fd45ae79225c569a3acdf442380c60701ac987a9fb6c965dda22132b2c2"
rebuild 1
sha256 cellar: :any_skip_relocation, all: "3a4143920243a863447daa6f2b17b3cda4e0a163e8502c6c36a910eee4ee7450"
end

depends_on macos: :sierra

on_linux do
depends_on "util-linux" # for `column`
end

conflicts_with "git-plus", because: "both install `git-recent` binaries"

def install
bin.install "git-recent"
end

test do
system "git", "init"
system "git", "init", "--initial-branch=main"
system "git", "recent"
# User will be 'BrewTestBot' on CI, needs to be set here to work locally
system "git", "config", "user.name", "BrewTestBot"
system "git", "config", "user.email", "[email protected]"
system "git", "commit", "--allow-empty", "-m", "test_commit"
assert_match(/.*master.*seconds? ago.*BrewTestBot.*\n.*test_commit/, shell_output("git recent"))
assert_match(/.*main.*seconds? ago.*BrewTestBot.*\n.*test_commit/, shell_output("git recent"))
end
end

0 comments on commit 02585ea

Please sign in to comment.