tap: permit creating shallow taps for CI
This commit is contained in:
parent
2a424ff982
commit
2acb4771fe
@ -27,6 +27,8 @@ module Homebrew
|
|||||||
switch "--full",
|
switch "--full",
|
||||||
description: "Convert a shallow clone to a full clone without untapping. By default, taps are no "\
|
description: "Convert a shallow clone to a full clone without untapping. By default, taps are no "\
|
||||||
"longer cloned as shallow clones."
|
"longer cloned as shallow clones."
|
||||||
|
switch "--shallow",
|
||||||
|
description: "Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration."
|
||||||
switch "--force-auto-update",
|
switch "--force-auto-update",
|
||||||
description: "Auto-update tap even if it is not hosted on GitHub. By default, only taps "\
|
description: "Auto-update tap even if it is not hosted on GitHub. By default, only taps "\
|
||||||
"hosted on GitHub are auto-updated (for performance reasons)."
|
"hosted on GitHub are auto-updated (for performance reasons)."
|
||||||
@ -55,7 +57,8 @@ module Homebrew
|
|||||||
begin
|
begin
|
||||||
tap.install clone_target: args.named.second,
|
tap.install clone_target: args.named.second,
|
||||||
force_auto_update: force_auto_update?,
|
force_auto_update: force_auto_update?,
|
||||||
quiet: args.quiet?
|
quiet: args.quiet?,
|
||||||
|
full_clone: !args.shallow?
|
||||||
rescue TapRemoteMismatchError => e
|
rescue TapRemoteMismatchError => e
|
||||||
odie e
|
odie e
|
||||||
rescue TapAlreadyTappedError
|
rescue TapAlreadyTappedError
|
||||||
|
@ -243,7 +243,7 @@ class Tap
|
|||||||
|
|
||||||
if installed?
|
if installed?
|
||||||
raise TapRemoteMismatchError.new(name, @remote, requested_remote) if clone_target && requested_remote != remote
|
raise TapRemoteMismatchError.new(name, @remote, requested_remote) if clone_target && requested_remote != remote
|
||||||
raise TapAlreadyTappedError, name if force_auto_update.nil?
|
raise TapAlreadyTappedError, name if force_auto_update.nil? && !shallow?
|
||||||
end
|
end
|
||||||
|
|
||||||
# ensure git is installed
|
# ensure git is installed
|
||||||
|
@ -502,6 +502,8 @@ HTTPS, e.g. SSH, git, HTTP, FTP(S), rsync.
|
|||||||
|
|
||||||
* `--full`:
|
* `--full`:
|
||||||
Convert a shallow clone to a full clone without untapping. By default, taps are no longer cloned as shallow clones.
|
Convert a shallow clone to a full clone without untapping. By default, taps are no longer cloned as shallow clones.
|
||||||
|
* `--shallow`:
|
||||||
|
Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration.
|
||||||
* `--force-auto-update`:
|
* `--force-auto-update`:
|
||||||
Auto-update tap even if it is not hosted on GitHub. By default, only taps hosted on GitHub are auto-updated (for performance reasons).
|
Auto-update tap even if it is not hosted on GitHub. By default, only taps hosted on GitHub are auto-updated (for performance reasons).
|
||||||
* `--repair`:
|
* `--repair`:
|
||||||
|
@ -638,6 +638,10 @@ With \fIURL\fR specified, tap a formula repository from anywhere, using any tran
|
|||||||
Convert a shallow clone to a full clone without untapping\. By default, taps are no longer cloned as shallow clones\.
|
Convert a shallow clone to a full clone without untapping\. By default, taps are no longer cloned as shallow clones\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-shallow\fR
|
||||||
|
Fetch tap as a shallow clone rather than a full clone\. Useful for continuous integration\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\fB\-\-force\-auto\-update\fR
|
\fB\-\-force\-auto\-update\fR
|
||||||
Auto\-update tap even if it is not hosted on GitHub\. By default, only taps hosted on GitHub are auto\-updated (for performance reasons)\.
|
Auto\-update tap even if it is not hosted on GitHub\. By default, only taps hosted on GitHub are auto\-updated (for performance reasons)\.
|
||||||
.
|
.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user