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
f43e428e
Commit
f43e428e
authored
May 16, 2014
by
Olivier Halligon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing Rakefile's bootstrap
parent
54a496dc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
26 deletions
+42
-26
Rakefile
Rakefile
+42
-26
No files found.
Rakefile
View file @
f43e428e
task
:build
do
title
"Building the gem"
end
require
"bundler/gem_tasks"
# Bootstrap task
# Bootstrap task
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
...
@@ -25,19 +19,33 @@ task :bootstrap, :use_bundle_dir? do |t, args|
...
@@ -25,19 +19,33 @@ task :bootstrap, :use_bundle_dir? do |t, args|
ENV
[
'ARCHFLAGS'
]
=
'-Wno-error=unused-command-line-argument-hard-error-in-future'
ENV
[
'ARCHFLAGS'
]
=
'-Wno-error=unused-command-line-argument-hard-error-in-future'
end
end
if
system
(
'which bundle'
)
puts
"Installing gems"
puts
"Installing gems"
if
args
[
:use_bundle_dir?
]
if
args
[
:use_bundle_dir?
]
execute_command
"env XCODEPROJ_BUILD=1 bundle install --path ./travis_bundle_dir"
execute_command
"env XCODEPROJ_BUILD=1 bundle install --path ./travis_bundle_dir"
else
else
execute_command
"env XCODEPROJ_BUILD=1 bundle install"
execute_command
"env XCODEPROJ_BUILD=1 bundle install"
end
end
else
$stderr
.
puts
red
(
"[!] Please install the bundler gem manually:
\n
"
\
' $ [sudo] gem install bundler'
)
exit
1
end
end
end
# Post release
begin
#-----------------------------------------------------------------------------#
task
:build
do
title
"Building the gem"
end
require
"bundler/gem_tasks"
desc
"Updates the last know version of CocoaPods in the specs repo"
# Post release
task
:post_release
do
#-----------------------------------------------------------------------------#
desc
"Updates the last know version of CocoaPods in the specs repo"
task
:post_release
do
title
"Updating last known version in Specs repo"
title
"Updating last known version in Specs repo"
specs_branch
=
'master'
specs_branch
=
'master'
Dir
.
chdir
(
'../Specs'
)
do
Dir
.
chdir
(
'../Specs'
)
do
...
@@ -47,7 +55,7 @@ task :post_release do
...
@@ -47,7 +55,7 @@ task :post_release do
yaml_file
=
'CocoaPods-version.yml'
yaml_file
=
'CocoaPods-version.yml'
unless
File
.
exist?
(
yaml_file
)
unless
File
.
exist?
(
yaml_file
)
$stderr
.
puts
"[!] Unable to find
#{
yaml_file
}
!"
$stderr
.
puts
red
(
"[!] Unable to find
#{
yaml_file
}
!"
)
exit
1
exit
1
end
end
require
'yaml'
require
'yaml'
...
@@ -60,12 +68,12 @@ task :post_release do
...
@@ -60,12 +68,12 @@ task :post_release do
sh
"git commit
#{
yaml_file
}
-m 'CocoaPods release
#{
gem_version
}
'"
sh
"git commit
#{
yaml_file
}
-m 'CocoaPods release
#{
gem_version
}
'"
sh
"git push"
sh
"git push"
end
end
end
end
# Spec
# Spec
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
namespace
:spec
do
namespace
:spec
do
def
specs
(
dir
)
def
specs
(
dir
)
FileList
[
"spec/
#{
dir
}
_spec.rb"
].
shuffle
.
join
(
' '
)
FileList
[
"spec/
#{
dir
}
_spec.rb"
].
shuffle
.
join
(
' '
)
...
@@ -105,7 +113,7 @@ namespace :spec do
...
@@ -105,7 +113,7 @@ namespace :spec do
desc
"Run the integration spec"
desc
"Run the integration spec"
task
:integration
do
task
:integration
do
unless
File
.
exists?
(
'spec/cocoapods-integration-specs'
)
unless
File
.
exists?
(
'spec/cocoapods-integration-specs'
)
$stderr
.
puts
"Integration files not checked out. Run `rake bootstrap`"
$stderr
.
puts
red
(
"Integration files not checked out. Run `rake bootstrap`"
)
exit
1
exit
1
end
end
...
@@ -186,13 +194,13 @@ namespace :spec do
...
@@ -186,13 +194,13 @@ namespace :spec do
end
end
task
:clean_env
=>
[
:clean_vcr
,
:unpack_fixture_tarballs
,
"ext:cleanbuild"
]
task
:clean_env
=>
[
:clean_vcr
,
:unpack_fixture_tarballs
,
"ext:cleanbuild"
]
end
end
# Examples
# Examples
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
task
:examples
=>
"examples:build"
task
:examples
=>
"examples:build"
namespace
:examples
do
namespace
:examples
do
desc
"Open all example workspaces in Xcode, which recreates the schemes."
desc
"Open all example workspaces in Xcode, which recreates the schemes."
task
:recreate_workspace_schemes
do
task
:recreate_workspace_schemes
do
...
@@ -232,14 +240,19 @@ namespace :examples do
...
@@ -232,14 +240,19 @@ namespace :examples do
end
end
end
end
end
end
end
end
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
desc
"Run all specs"
desc
"Run all specs"
task
:spec
=>
'spec:all'
task
:spec
=>
'spec:all'
task
:default
=>
:spec
task
:default
=>
:spec
rescue
LoadError
$stderr
.
puts
red
(
'[!] Some Rake tasks haven been disabled because the '
\
'environment couldn’t be loaded. Be sure to run `rake bootstrap` first.'
)
end
# Helpers
# Helpers
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
...
@@ -267,3 +280,6 @@ def title(title)
...
@@ -267,3 +280,6 @@ def title(title)
puts
puts
end
end
def
red
(
string
)
"
\033
[0;31m
#{
string
}
\e
[0m"
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