Skip to content

Commit

Permalink
add git version inference code
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-makarov committed Nov 10, 2019
1 parent 8a9b649 commit 22830b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion RxReactiveObjC.podspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#!/usr/bin/env ruby
filename = File.basename(__FILE__, '.podspec')
def self.infer_version_from_git
return nil unless Dir.exist?('.git')

`git tag --merged HEAD --sort=committerdate`.split.select do |tag|
Version.correct?(tag)
end.last
end

Pod::Spec.new do |s|
s.name = filename
s.version = '1.0.0'
s.version = infer_version_from_git || (raise Informative, 'Could not infer `llbuild` version from git')
s.summary = 'Bridge between RxSwift and ReactiveObjC'

s.description = <<-DESC
Expand Down

0 comments on commit 22830b3

Please sign in to comment.