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
63a39cff
Commit
63a39cff
authored
Sep 08, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed Dir.chdir's from the push command
parent
03d8362e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
push.rb
lib/cocoapods/command/repo/push.rb
+17
-13
No files found.
lib/cocoapods/command/repo/push.rb
View file @
63a39cff
...
...
@@ -96,7 +96,7 @@ module Pod
# specs to the master repo.
#
def
check_if_master_repo
remotes
=
Dir
.
chdir
(
repo_dir
)
{
`git remote -v 2>&1`
}
remotes
=
`git -C
#{
repo_dir
}
remote -v 2>&1`
master_repo_urls
=
[
'git@github.com:CocoaPods/Specs.git'
,
'https://github.com/CocoaPods/Specs.git'
,
...
...
@@ -145,7 +145,7 @@ module Pod
# @return [void]
#
def
check_repo_status
clean
=
Dir
.
chdir
(
repo_dir
)
{
`git status --porcelain 2>&1`
}
==
''
clean
=
`git -C
#{
repo_dir
}
status --porcelain 2>&1`
==
''
raise
Informative
,
"The repo `
#{
@repo
}
` at
#{
UI
.
path
repo_dir
}
is not clean"
unless
clean
end
...
...
@@ -155,7 +155,7 @@ module Pod
#
def
update_repo
UI
.
puts
"Updating the `
#{
@repo
}
' repo
\n
"
.
yellow
Dir
.
chdir
(
repo_dir
)
{
UI
.
puts
`git pull 2>&1`
}
UI
.
puts
`git -C
#{
repo_dir
}
pull 2>&1`
end
# Commits the podspecs to the source, which should be a git repo.
...
...
@@ -189,15 +189,13 @@ module Pod
FileUtils
.
cp
(
spec_file
,
output_path
)
end
Dir
.
chdir
(
repo_dir
)
do
# only commit if modified
if
git!
(
'status'
,
'--porcelain'
).
include?
(
spec
.
name
)
UI
.
puts
" -
#{
message
}
"
git!
(
'add'
,
spec
.
name
)
git!
(
'commit'
,
'--no-verify'
,
'-m'
,
message
)
else
UI
.
puts
" - [No change]
#{
spec
}
"
end
# only commit if modified
if
repo_git
(
'status'
,
'--porcelain'
).
include?
(
spec
.
name
)
UI
.
puts
" -
#{
message
}
"
repo_git
(
'add'
,
spec
.
name
)
repo_git
(
'commit'
,
'--no-verify'
,
'-m'
,
message
)
else
UI
.
puts
" - [No change]
#{
spec
}
"
end
end
end
...
...
@@ -208,7 +206,7 @@ module Pod
#
def
push_repo
UI
.
puts
"
\n
Pushing the `
#{
@repo
}
' repo
\n
"
.
yellow
Dir
.
chdir
(
repo_dir
)
{
UI
.
puts
`git push origin master 2>&1`
}
UI
.
puts
`git -C
#{
repo_dir
}
push origin master 2>&1`
end
#---------------------------------------------------------------------#
...
...
@@ -217,6 +215,12 @@ module Pod
# @!group Private helpers
# @return result of calling the git! with args in repo_dir
#
def
repo_git
(
*
args
)
git!
([
"-C"
,
repo_dir
]
+
args
)
end
# @return [Pathname] The directory of the repository.
#
def
repo_dir
...
...
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