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
7eded483
Commit
7eded483
authored
Jun 06, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into develop
parents
590ece64
f4d3673f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
16 deletions
+33
-16
Rakefile
Rakefile
+33
-16
No files found.
Rakefile
View file @
7eded483
...
@@ -68,24 +68,41 @@ namespace :gem do
...
@@ -68,24 +68,41 @@ namespace :gem do
desc
"Run all specs, build and install gem, commit version change, tag version change, and push everything"
desc
"Run all specs, build and install gem, commit version change, tag version change, and push everything"
task
:release
do
task
:release
do
if
`git symbolic-ref HEAD 2>/dev/null`
.
strip
.
split
(
'/'
).
last
!=
'master'
$stderr
.
puts
"You need to be on the `master' branch in order to be able to do a release."
exit
1
end
if
`git tag`
.
strip
.
split
(
"
\n
"
).
include?
(
gem_version
)
$stderr
.
puts
"A tag for version `
#{
gem_version
}
' already exists. Change the version in lib/cocoapods.rb"
exit
1
end
puts
"You are about to release `
#{
gem_version
}
', is that correct? [y/n]"
puts
"You are about to release `
#{
gem_version
}
', is that correct? [y/n]"
exit
if
STDIN
.
gets
.
strip
.
downcase
!=
'y'
exit
if
$stdin
.
gets
.
strip
.
downcase
!=
'y'
lines
=
`git diff --numstat`
.
strip
.
split
(
"
\n
"
)
if
lines
.
size
==
0
diff_lines
=
`git diff --numstat`
.
strip
.
split
(
"
\n
"
)
puts
"Change the version number yourself in lib/cocoapods.rb"
elsif
lines
.
size
==
1
&&
lines
.
first
.
include?
(
'lib/cocoapods.rb'
)
if
diff_lines
.
size
==
0
||
!
diff_lines
.
first
.
include?
(
'lib/cocoapods.rb'
)
# First see if the specs pass and gem builds and installs
$stderr
.
puts
"Change the version number yourself in lib/cocoapods.rb"
Rake
::
Task
[
'spec:all'
].
invoke
exit
1
Rake
::
Task
[
'gem:install'
].
invoke
end
# Then release
sh
"git commit lib/cocoapods.rb -m 'Release
#{
gem_version
}
'"
if
diff_lines
.
size
>
1
||
!
diff_lines
.
first
.
include?
(
'lib/cocoapods.rb'
)
sh
"git tag -a
#{
gem_version
}
-m 'Release
#{
gem_version
}
'"
$stderr
.
puts
"Only change the version number in a release commit!"
sh
"git push origin master"
exit
1
sh
"git push --tags"
sh
"gem push
#{
gem_filename
}
"
else
puts
"Only change the version number in a release commit!"
end
end
# First see if the specs pass and gem builds and installs
Rake
::
Task
[
'spec:all'
].
invoke
Rake
::
Task
[
'gem:install'
].
invoke
# Then release
sh
"git commit lib/cocoapods.rb -m 'Release
#{
gem_version
}
'"
sh
"git tag -a
#{
gem_version
}
-m 'Release
#{
gem_version
}
'"
sh
"git push origin master"
sh
"git push origin --tags"
sh
"gem push
#{
gem_filename
}
"
end
end
end
end
...
...
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