Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
a4d4fb57
Commit
a4d4fb57
authored
4 years ago
by
Seeker
Browse files
Options
Downloads
Patches
Plain Diff
bump-formula-pr: expedite check for missing mirror argument
parent
2314ddf9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/dev-cmd/bump-formula-pr.rb
+15
-14
15 additions, 14 deletions
Library/Homebrew/dev-cmd/bump-formula-pr.rb
with
15 additions
and
14 deletions
Library/Homebrew/dev-cmd/bump-formula-pr.rb
+
15
−
14
View file @
a4d4fb57
...
...
@@ -145,6 +145,21 @@ module Homebrew
formula_spec
=
formula
.
stable
odie
"
#{
formula
}
: no
#{
requested_spec
}
specification found!"
unless
formula_spec
new_mirrors
||=
args
.
mirror
new_mirror
||=
determine_mirror
(
new_url
)
new_mirrors
||=
[
new_mirror
]
unless
new_mirror
.
nil?
if
!
new_mirrors
&&
!
formula_spec
.
mirrors
.
empty?
if
args
.
force?
opoo
"
#{
formula
}
: Removing all mirrors because a --mirror= argument was not specified."
else
odie
<<~
EOS
#{
formula
}
: a --mirror= argument for updating the mirror URL was not specified.
Use --force to remove all mirrors.
EOS
end
end
hash_type
,
old_hash
=
if
(
checksum
=
formula_spec
.
checksum
)
[
checksum
.
hash_type
,
checksum
.
hexdigest
]
end
...
...
@@ -152,9 +167,6 @@ module Homebrew
new_hash
=
args
[
hash_type
]
if
hash_type
new_tag
=
args
.
tag
new_revision
=
args
.
revision
new_mirrors
||=
args
.
mirror
new_mirror
||=
determine_mirror
(
new_url
)
new_mirrors
||=
[
new_mirror
]
unless
new_mirror
.
nil?
old_url
=
formula_spec
.
url
old_tag
=
formula_spec
.
specs
[
:tag
]
old_formula_version
=
formula_version
(
formula
,
requested_spec
)
...
...
@@ -303,17 +315,6 @@ module Homebrew
new_formula_version
=
formula_version
(
formula
,
requested_spec
,
new_contents
)
if
!
new_mirrors
&&
!
formula_spec
.
mirrors
.
empty?
if
args
.
force?
opoo
"
#{
formula
}
: Removing all mirrors because a --mirror= argument was not specified."
else
odie
<<~
EOS
#{
formula
}
: a --mirror= argument for updating the mirror URL was not specified.
Use --force to remove all mirrors.
EOS
end
end
if
new_formula_version
<
old_formula_version
formula
.
path
.
atomic_write
(
old_contents
)
unless
args
.
dry_run?
odie
<<~
EOS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment