From f5cd15fa1893d58676a005c54dcaded3cdf61729 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Thu, 27 Aug 2020 16:40:12 -0400 Subject: [PATCH] add odeprecated comments --- Library/Homebrew/formula.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index c92a5e4583..41640b0b27 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2780,6 +2780,9 @@ class Formula # will not be deprecated. #
deprecate! date: "2020-08-27", because: "it is no longer maintained"
def deprecate!(date: nil, because: nil) + # TODO: enable for next major/minor release + # odeprecated "`deprecate!` without a reason", "`deprecate! because: \"reason\"`" if because.blank? + return if date.present? && Date.parse(date) > Date.today @deprecation_reason = because if because.present? @@ -2803,6 +2806,9 @@ class Formula # will be deprecated instead of disabled. #
disable! date: "2020-08-27", because: "it no longer builds"
def disable!(date: nil, because: nil) + # TODO: enable for next major/minor release + # odeprecated "`disable!` without a reason", "`disable! because: \"reason\"`" if because.blank? + if date.present? && Date.parse(date) > Date.today @deprecation_reason = because if because.present? @deprecated = true