Skip to content

Commit

Permalink
Parses the .semver file if the semver2 gem is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
mscottford committed Aug 19, 2023
1 parent cfce2d8 commit 0b583d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion freshli-commons.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ begin
semver_version = SemVer.find.format('%M.%m.%p%s%d')
# rubocop:enable Style/FormatStringToken
rescue LoadError
semver_version = '0.0.0'
require 'yaml'
version_data = YAML.load_file(File.join(__dir__, '.semver'))
semver_version = "#{version_data[:major]}.#{version_data[:minor]}.#{version_data[:patch]}-#{version_data[:special]}"
end

Gem::Specification.new do |spec|
Expand Down

0 comments on commit 0b583d5

Please sign in to comment.