Skip to content

Commit

Permalink
Handles scenario where semver2 is not installed when `bundle instal…
Browse files Browse the repository at this point in the history
…l` is run
  • Loading branch information
mscottford committed Aug 19, 2023
1 parent 82137cb commit bfc990c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
freshli-commons (0.6.0.pre.dev)
freshli-commons (0.6.1.pre.dev)
aruba (~> 2.1.0)
grpc
rspec-expectations
Expand Down
13 changes: 9 additions & 4 deletions freshli-commons.gemspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# frozen_string_literal: true

require 'semver'
begin
require 'semver'
# rubocop:disable Style/FormatStringToken
semver_version = SemVer.find.format('%M.%m.%p%s%d')
# rubocop:enable Style/FormatStringToken
rescue LoadError
semver_version = '0.0.0'
end

Gem::Specification.new do |spec|
spec.name = 'freshli-commons'

# rubocop:disable Style/FormatStringToken
spec.version = SemVer.find.format('%M.%m.%p%s%d')
# rubocop:enable Style/FormatStringToken
spec.version = semver_version

spec.authors = ['M. Scott Ford']
spec.email = ['[email protected]']
Expand Down

0 comments on commit bfc990c

Please sign in to comment.