diff --git a/lib/view_component/deprecation.rb b/lib/view_component/deprecation.rb index e908158327..5a33df65d9 100644 --- a/lib/view_component/deprecation.rb +++ b/lib/view_component/deprecation.rb @@ -3,5 +3,6 @@ require "active_support/deprecation" module ViewComponent - Deprecation = ActiveSupport::Deprecation.new("3.0", "ViewComponent") + DEPRECATION_HORIZON = 3 + Deprecation = ActiveSupport::Deprecation.new(DEPRECATION_HORIZON.to_s, "ViewComponent") end diff --git a/script/release b/script/release index a854d53fb1..9ae555a7fc 100755 --- a/script/release +++ b/script/release @@ -46,6 +46,12 @@ update_ruby_version() { -e "s/MINOR = [0-9]+/MINOR = $2/g" \ -e "s/PATCH = [0-9]+/PATCH = $3/g" \ lib/view_component/version.rb + + # Update deprecation horizon version + major=$1 + sed -E -i '' \ + -e "s/DEPRECATION_HORIZON = [0-9]+/DEPRECATION_HORIZON = $((major + 1))/g" \ + lib/view_component/deprecation.rb } update_gemfiles() {