From 8385f179dfc6dc056a248cb445627fa02f83f397 Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Thu, 2 Mar 2017 21:21:52 -0800 Subject: audit: reject versions starting with HEAD Many parts of Homebrew assume that a version string beginning with "HEAD" is, in fact, a head build. A stable version that begins with "HEAD" violates this assumption and causes problems, as it's treated as a head build in some places and as a stable build in others. --- Library/Homebrew/dev-cmd/audit.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index a8c18f7b6..90dd03c1c 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -755,6 +755,9 @@ class FormulaAuditor if version.to_s !~ /\d/ problem "#{name}: version (#{version}) is set to a string without a digit" end + if version.to_s.start_with?("HEAD") + problem "#{name}: non-HEAD version name (#{version}) should not begin with HEAD" + end end if formula.stable && formula.devel -- cgit v1.2.3