Skip to content

Commit

Permalink
fix release check for matching versions to work right for non-prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
jrochkind committed Jan 7, 2025
1 parent 83d3ce7 commit 7f743f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ task :guard_version_match do

# 9.0.0.beta1 in gem becomes 9.0.0-beta1 in npm
gem_version_parts = gem_version.split(".")

npm_version_required = [
gem_version_parts.slice(0, 3).join("."),
gem_version_parts.slice(3, gem_version_parts.length).join(".")
].join("-")
].collect {|s| s if s && !s.empty? }.compact.join("-")

if npm_version != npm_version_required
raise <<~EOS
Expand Down

0 comments on commit 7f743f1

Please sign in to comment.