Commit 67ceecc1 authored by Ashton Williams's avatar Ashton Williams

`pod spec create` will use `"#{s.version}"` as the git tag when possible

parent 22a16c69
...@@ -60,7 +60,7 @@ module Pod ...@@ -60,7 +60,7 @@ module Pod
data[:author_email] = `git config --get user.email`.strip data[:author_email] = `git config --get user.email`.strip
data[:source_url] = "http://EXAMPLE/#{name}.git" data[:source_url] = "http://EXAMPLE/#{name}.git"
data[:ref_type] = ':tag' data[:ref_type] = ':tag'
data[:ref] = 's.version.to_s' data[:ref] = '#{s.version}'
data data
end end
...@@ -96,10 +96,11 @@ module Pod ...@@ -96,10 +96,11 @@ module Pod
master = branches.find { |branch| branch['name'] == master_name } master = branches.find { |branch| branch['name'] == master_name }
raise Informative, "Unable to find any commits on the master branch for the repository `#{repo['html_url']}`" unless master raise Informative, "Unable to find any commits on the master branch for the repository `#{repo['html_url']}`" unless master
data[:ref_type] = ':commit' data[:ref_type] = ':commit'
data[:ref] = %("#{master['commit']['sha']}") data[:ref] = master['commit']['sha']
else else
data[:ref_type] = ':tag' data[:ref_type] = ':tag'
data[:ref] = (versions_tags[version] == version) ? 's.version.to_s' : %("#{versions_tags[version]}") data[:ref] = versions_tags[version]
data[:ref] = '#{s.version}' if "#{version}" == versions_tags[version]
end end
data data
end end
...@@ -187,7 +188,7 @@ Pod::Spec.new do |s| ...@@ -187,7 +188,7 @@ Pod::Spec.new do |s|
# Supports git, hg, bzr, svn and HTTP. # Supports git, hg, bzr, svn and HTTP.
# #
s.source = { :git => "#{data[:source_url]}", #{data[:ref_type]} => #{data[:ref]} } s.source = { :git => "#{data[:source_url]}", #{data[:ref_type]} => "#{data[:ref]}" }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment