Skip to content

Commit

Permalink
fix: detect rcs properly
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Dec 13, 2022
1 parent b6af1be commit bbbb8a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/git_ops/version.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ defmodule GitOps.Version do
!(rc? && last_valid_non_rc_version &&
(last_valid_non_rc_version.major != parsed.major ||
last_valid_non_rc_version.minor != parsed.minor)) ->
if match?(["rc" <> _], parsed.pre) && !rc? do
if match?(["rc" <> _ | _], parsed.pre) && !rc? do
parsed
else
%{parsed | minor: parsed.minor + 1, patch: 0, pre: pre}
Expand All @@ -121,7 +121,7 @@ defmodule GitOps.Version do
parsed
end

if match?(["rc" <> _], parsed.pre) && !rc? do
if match?(["rc" <> _ | _], parsed.pre) && !rc? do
%{new_version | pre: List.wrap(opts[:pre_release])}
else
new_version
Expand Down

0 comments on commit bbbb8a1

Please sign in to comment.