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
0197647a
Commit
0197647a
authored
Nov 27, 2015
by
Bart Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to pass custom commit message as argument
parent
0d927123
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
push.rb
lib/cocoapods/command/repo/push.rb
+9
-9
No files found.
lib/cocoapods/command/repo/push.rb
View file @
0197647a
...
...
@@ -29,7 +29,8 @@ module Pod
'Multiple sources must be comma-delimited.'
],
[
'--local-only'
,
'Does not perform the step of pushing REPO to its remote'
],
[
'--no-private'
,
'Lint includes checks that apply only to public repos'
],
[
'--message'
,
'Add custom commit message'
],
[
'--commit-message="Fix bug in pod"'
,
'Add custom commit message. '
\
'Opens default editor if no commit message is specified.'
],
].
concat
(
super
)
end
...
...
@@ -41,7 +42,8 @@ module Pod
@podspec
=
argv
.
shift_argument
@use_frameworks
=
!
argv
.
flag?
(
'use-libraries'
)
@private
=
argv
.
flag?
(
'private'
,
true
)
@message
=
argv
.
flag?
(
'message'
)
@message
=
argv
.
option
(
'commit-message'
)
@commit_message
=
argv
.
flag?
(
'commit-message'
,
false
)
super
end
...
...
@@ -51,7 +53,7 @@ module Pod
end
def
run
open_editor
if
@
message
open_editor
if
@
commit_message
&&
@message
.
nil?
check_if_master_repo
validate_podspec_files
check_repo_status
...
...
@@ -72,16 +74,14 @@ module Pod
# Open default editor to allow users to enter commit message
#
def
open_editor
return
if
ENV
[
'EDITOR'
].
nil?
file
=
Tempfile
.
new
(
'cocoapods'
)
File
.
chmod
(
0777
,
file
.
path
)
file
.
close
if
!
ENV
[
'EDITOR'
].
nil?
@message
=
nil
else
system
(
"
#{
ENV
[
'EDITOR'
]
}
#{
file
.
path
}
"
)
@message
=
File
.
read
file
.
path
end
system
(
"
#{
ENV
[
'EDITOR'
]
}
#{
file
.
path
}
"
)
@message
=
File
.
read
file
.
path
end
# Temporary check to ensure that users do not push accidentally private
...
...
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