generate-man-completions: also fail if only date changed
This commit is contained in:
parent
13c3def049
commit
79fb75177f
@ -28,10 +28,13 @@ module Homebrew
|
|||||||
Completions.update_shell_completions!
|
Completions.update_shell_completions!
|
||||||
|
|
||||||
diff = system_command "git", args: [
|
diff = system_command "git", args: [
|
||||||
"-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "docs/Manpage.md", "manpages", "completions"
|
"-C", HOMEBREW_REPOSITORY,
|
||||||
|
"diff", "--shortstat", "--patch", "--exit-code", "docs/Manpage.md", "manpages", "completions"
|
||||||
]
|
]
|
||||||
if diff.status.success?
|
if diff.status.success?
|
||||||
ofail "No changes to manpage or completions."
|
ofail "No changes to manpage or completions."
|
||||||
|
elsif /1 file changed, 1 insertion\(\+\), 1 deletion\(-\).*-\.TH "BREW" "1" "\w+ \d+"/m.match?(diff.stdout)
|
||||||
|
ofail "No changes to manpage or completions other than the date."
|
||||||
else
|
else
|
||||||
puts "Manpage and completions updated."
|
puts "Manpage and completions updated."
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user