Skip to content

Commit f831eb2

Browse files
committed
fix(packaging): omit redundant version from homebrew formula
brew audit --strict reports an explicit version that the release URL already implies.
1 parent f0c1274 commit f831eb2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎tools/render-homebrew.sh‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ cat >"${STAGING}/Formula/git-credit.rb" <<EOF
3636
class GitCredit < Formula
3737
desc "Fair git authorship stats"
3838
homepage "https://github.com/avhn/git-credit"
39-
version "${VERSION}"
4039
license any_of: ["MIT", "Apache-2.0"]
4140
4241
on_macos do

‎tools/tests/packaging_test.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def test_four_platform_formula_and_repeatability(self):
5151
for fragment in ('license any_of: ["MIT", "Apache-2.0"]', 'bin.install "git-credit"',
5252
'assert_match version.to_s, shell_output("#{bin}/git-credit --version")'):
5353
self.assertIn(fragment, text)
54+
# `brew audit --strict` rejects an explicit version that the URL already implies.
55+
self.assertNotRegex(text, r'(?m)^\s*version "')
5456
if shutil.which("ruby"):
5557
result = subprocess.run(["ruby", "-c", str(formula)], cwd=ROOT,
5658
capture_output=True, text=True, timeout=30)

0 commit comments

Comments
 (0)