Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions script/release
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ update_ruby_version() {
-e "s/PATCH = [0-9]+/PATCH = $3/g" \
lib/view_component/version.rb

# Update deprecation horizon version
# Update deprecation horizon version. deprecation.rb stores the value
# as a quoted string (e.g. "4.0.0"), so match/replace the full quoted
# X.Y.Z — the previous [0-9]+ pattern matched no digits before the
# opening quote and silently no-oped on every release.
major=$1
sed -E -i '' \
-e "s/DEPRECATION_HORIZON = [0-9]+/DEPRECATION_HORIZON = $((major + 1))/g" \
-e "s/DEPRECATION_HORIZON = \"[0-9]+\.[0-9]+\.[0-9]+\"/DEPRECATION_HORIZON = \"$((major + 1)).0.0\"/g" \
lib/view_component/deprecation.rb
}

Expand Down
Loading