Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
67ceecc1
Commit
67ceecc1
authored
Nov 20, 2015
by
Ashton Williams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`pod spec create` will use `"#{s.version}"` as the git tag when possible
parent
22a16c69
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
create.rb
lib/cocoapods/command/spec/create.rb
+5
-4
No files found.
lib/cocoapods/command/spec/create.rb
View file @
67ceecc1
...
@@ -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 ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment