Skip to content

Commit

Permalink
[Acceptor] Enable comparison with previous specs
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed May 22, 2013
1 parent 3d62029 commit 71846fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/cocoapods-core/source/acceptor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def initialize(repo)
def analyze(spec, previous_spec = nil)
errors = []
check_spec_source_change(spec, errors)
check_if_untagged_version_is_acceptable(spec, errors)
check_if_untagged_version_is_acceptable(spec, previous_spec, errors)
check_commit_change_for_untagged_version(spec, previous_spec, errors)
check_dependencies(spec, errors)
errors
Expand Down Expand Up @@ -81,9 +81,10 @@ def check_spec_source_change(spec, errors)
#
# @return [void]
#
def check_if_untagged_version_is_acceptable(spec, errors)
def check_if_untagged_version_is_acceptable(spec, previous_spec, errors)
return if !spec.source[:git] || spec.source[:tag]
return unless related_specifications(spec)
return if previous_spec
has_tagged_spec = related_specifications(spec).any? { |s| s.version != '0.0.1' }
if has_tagged_spec
errors << "There is already at least one versioned specification so " \
Expand Down

0 comments on commit 71846fc

Please sign in to comment.