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
ad82764d
Commit
ad82764d
authored
Nov 26, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add gem:release task.
parent
a5ca2cd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
41 deletions
+41
-41
Rakefile
Rakefile
+41
-41
No files found.
Rakefile
View file @
ad82764d
...
...
@@ -38,12 +38,47 @@ task :clean do
sh
"rm -f *.gem"
end
desc
"Install a gem version of the current code"
task
:install
do
require
'lib/cocoapods'
sh
"gem build cocoapods.gemspec"
sh
"sudo macgem install cocoapods-
#{
Pod
::
VERSION
}
.gem"
sh
"sudo macgem compile cocoapods"
namespace
:gem
do
def
gem_version
require
'lib/cocoapods'
Pod
::
VERSION
end
def
gem_filename
"cocoapods-
#{
Pod
::
VERSION
}
.gem"
end
desc
"Build a gem for the current version"
task
:build
do
sh
"gem build cocoapods.gemspec"
end
desc
"Install a gem version of the current code"
task
:install
=>
:build
do
sh
"sudo macgem install
#{
gem_filename
}
"
#sh "sudo macgem compile cocoapods"
end
desc
"Build and install gem, then commit version change, tag it, and push everything"
task
:release
do
puts
"You are about to release `
#{
gem_version
}
', is that correct? [y/n]"
exit
if
STDIN
.
gets
.
strip
.
downcase
!=
'y'
lines
=
`git diff --numstat`
.
strip
.
split
(
"
\n
"
)
if
lines
.
size
==
0
puts
"Change the version number yourself in lib/cocoapods.rb"
elsif
lines
.
size
==
1
&&
lines
.
first
.
include?
(
'lib/cocoapods.rb'
)
# First see if the gem builds and installs
Rake
::
Task
[
'gem:install'
].
invoke
# Then release
`git commit lib/cocoapods.rb -m 'Release
#{
gem_version
}
'`
`git tag -a
#{
gem_version
}
-m 'Release
#{
gem_version
}
'`
`git push origin master`
`git push --tags`
`gem push
#{
gem_filename
}
`
else
puts
"Only change the version number in a release commit!"
end
end
end
namespace
:spec
do
...
...
@@ -129,40 +164,5 @@ namespace :examples do
end
end
desc
"Build all examples"
task
:build_examples
=>
'examples:build'
desc
"Dumps a Xcode project as YAML, meant for diffing"
task
:dump_xcodeproj
do
require
'yaml'
hash
=
NSDictionary
.
dictionaryWithContentsOfFile
(
File
.
join
(
ENV
[
'xcodeproj'
],
'project.pbxproj'
))
objects
=
hash
[
'objects'
]
result
=
objects
.
values
.
map
do
|
object
|
if
children
=
object
[
'children'
]
object
[
'children'
]
=
children
.
map
do
|
uuid
|
child
=
objects
[
uuid
]
child
[
'path'
]
||
child
[
'name'
]
end
.
sort
elsif
files
=
object
[
'files'
]
object
[
'files'
]
=
files
.
map
do
|
uuid
|
build_file
=
objects
[
uuid
]
file
=
objects
[
build_file
[
'fileRef'
]]
file
[
'path'
]
end
elsif
file_ref
=
object
[
'fileRef'
]
file
=
objects
[
file_ref
]
object
[
'file'
]
=
file
[
'path'
]
end
object
end
result
.
each
do
|
object
|
object
.
delete
(
'fileRef'
)
end
result
=
result
.
sort_by
do
|
object
|
[
object
[
'isa'
],
object
[
'file'
],
object
[
'path'
],
object
[
'name'
]].
compact
end
puts
result
.
to_yaml
end
desc
"Run all specs"
task
:spec
=>
'spec:all'
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