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
2d8b4376
Commit
2d8b4376
authored
8 years ago
by
Anastasia Sulyagina
Committed by
Mike McQuaid
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
update-report: migrate formulae to casks. (#375)
parent
6dc72f26
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/cmd/update-report.rb
+20
-4
20 additions, 4 deletions
Library/Homebrew/cmd/update-report.rb
with
20 additions
and
4 deletions
Library/Homebrew/cmd/update-report.rb
+
20
−
4
View file @
2d8b4376
...
...
@@ -250,10 +250,26 @@ class Reporter
tabs
=
dir
.
subdirs
.
map
{
|
d
|
Tab
.
for_keg
(
Keg
.
new
(
d
))
}
next
unless
tabs
.
first
.
tap
==
tap
# skip if installed formula is not from this tap.
new_tap
=
Tap
.
fetch
(
new_tap_name
)
new_tap
.
install
unless
new_tap
.
installed?
# update tap for each Tab
tabs
.
each
{
|
tab
|
tab
.
tap
=
new_tap
}
tabs
.
each
(
&
:write
)
# For formulae migrated to cask: Auto-install cask or provide install instructions.
if
new_tap_name
==
"caskroom/cask"
system
HOMEBREW_BREW_FILE
,
"uninstall"
,
name
if
new_tap
.
installed?
&&
(
HOMEBREW_REPOSITORY
/
"Caskroom"
).
directory?
ohai
"
#{
name
}
has been moved to Homebrew Cask. Installing
#{
name
}
..."
system
HOMEBREW_BREW_FILE
,
"uninstall"
,
"--force"
,
name
system
HOMEBREW_BREW_FILE
,
"cask"
,
"install"
,
name
else
ohai
"
#{
name
}
has been moved to Homebrew Cask."
,
<<-
EOS
.
undent
To uninstall the formula and install the cask run:
brew uninstall --force
#{
name
}
brew cask install
#{
name
}
EOS
end
else
new_tap
.
install
unless
new_tap
.
installed?
# update tap for each Tab
tabs
.
each
{
|
tab
|
tab
.
tap
=
new_tap
}
tabs
.
each
(
&
:write
)
end
end
end
...
...
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