mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Refer to default branch in links with HEAD
Anywhere we can use `blob/master` we can use `blob/HEAD` instead. This will make life easier if we ever rename our default branch in future (once/if Git and GitHub provides the necessary tooling to do so).
This commit is contained in:
parent
1f770270b4
commit
ac0665daff
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,7 +1,7 @@
|
|||||||
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md) document?
|
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md) document?
|
||||||
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?
|
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?
|
||||||
- [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
|
- [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
|
||||||
- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/test/PATH_spec.rb).
|
- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/test/PATH_spec.rb).
|
||||||
- [ ] Have you successfully run `brew style` with your changes locally?
|
- [ ] Have you successfully run `brew style` with your changes locally?
|
||||||
- [ ] Have you successfully run `brew tests` with your changes locally?
|
- [ ] Have you successfully run `brew tests` with your changes locally?
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Contributing to Homebrew
|
# Contributing to Homebrew
|
||||||
|
|
||||||
First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct) and review [How To Open a Homebrew Pull Request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request).
|
First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct) and review [How To Open a Homebrew Pull Request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request).
|
||||||
|
|
||||||
### Report a bug
|
### Report a bug
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
inherit_from: ./.rubocop_shared.yml
|
inherit_from: ./.rubocop_shared.yml
|
||||||
|
|
||||||
Cask/HomepageMatchesUrl:
|
Cask/HomepageMatchesUrl:
|
||||||
Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
|
Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Exclude:
|
Exclude:
|
||||||
- '**/test/support/fixtures/cask/Casks/**/*.rb'
|
- '**/test/support/fixtures/cask/Casks/**/*.rb'
|
||||||
@ -15,11 +15,11 @@ Cask/NoDslVersion:
|
|||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Cask/StanzaGrouping:
|
Cask/StanzaGrouping:
|
||||||
Description: 'Ensure that cask stanzas are grouped correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
|
Description: 'Ensure that cask stanzas are grouped correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order'
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Cask/StanzaOrder:
|
Cask/StanzaOrder:
|
||||||
Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
|
Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order'
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Layout/HashAlignment:
|
Layout/HashAlignment:
|
||||||
|
@ -219,7 +219,7 @@ module Cask
|
|||||||
def check_hosting_with_appcast
|
def check_hosting_with_appcast
|
||||||
return if cask.appcast
|
return if cask.appcast
|
||||||
|
|
||||||
add_appcast = "please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/appcast.md"
|
add_appcast = "please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/appcast.md"
|
||||||
|
|
||||||
case cask.url.to_s
|
case cask.url.to_s
|
||||||
when %r{github.com/([^/]+)/([^/]+)/releases/download/(\S+)}
|
when %r{github.com/([^/]+)/([^/]+)/releases/download/(\S+)}
|
||||||
@ -246,9 +246,9 @@ module Cask
|
|||||||
def check_download_url_format
|
def check_download_url_format
|
||||||
odebug "Auditing URL format"
|
odebug "Auditing URL format"
|
||||||
if bad_sourceforge_url?
|
if bad_sourceforge_url?
|
||||||
add_warning "SourceForge URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
|
add_warning "SourceForge URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
|
||||||
elsif bad_osdn_url?
|
elsif bad_osdn_url?
|
||||||
add_warning "OSDN URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
|
add_warning "OSDN URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ module Cask
|
|||||||
end
|
end
|
||||||
|
|
||||||
def core_formula_url
|
def core_formula_url
|
||||||
"#{core_tap.default_remote}/blob/master/Formula/#{cask.token}.rb"
|
"#{core_tap.default_remote}/blob/HEAD/Formula/#{cask.token}.rb"
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_download
|
def check_download
|
||||||
|
@ -97,7 +97,7 @@ module Cask
|
|||||||
url = if cask.tap.custom_remote? && !cask.tap.remote.nil?
|
url = if cask.tap.custom_remote? && !cask.tap.remote.nil?
|
||||||
cask.tap.remote
|
cask.tap.remote
|
||||||
else
|
else
|
||||||
"#{cask.tap.default_remote}/blob/master/Casks/#{cask.token}.rb"
|
"#{cask.tap.default_remote}/blob/HEAD/Casks/#{cask.token}.rb"
|
||||||
end
|
end
|
||||||
|
|
||||||
"From: #{Formatter.url(url)}"
|
"From: #{Formatter.url(url)}"
|
||||||
|
@ -151,7 +151,7 @@ module Cask
|
|||||||
File: #{path}
|
File: #{path}
|
||||||
To retry an incomplete download, remove the file above.
|
To retry an incomplete download, remove the file above.
|
||||||
If the issue persists, visit:
|
If the issue persists, visit:
|
||||||
#{Formatter.url("https://github.com/Homebrew/homebrew-cask/blob/master/doc/reporting_bugs/checksum_does_not_match_error.md")}
|
#{Formatter.url("https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/reporting_bugs/checksum_does_not_match_error.md")}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -140,7 +140,7 @@ module Homebrew
|
|||||||
|
|
||||||
def github_remote_path(remote, path)
|
def github_remote_path(remote, path)
|
||||||
if remote =~ %r{^(?:https?://|git(?:@|://))github\.com[:/](.+)/(.+?)(?:\.git)?$}
|
if remote =~ %r{^(?:https?://|git(?:@|://))github\.com[:/](.+)/(.+?)(?:\.git)?$}
|
||||||
"https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/blob/master/#{path}"
|
"https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/blob/HEAD/#{path}"
|
||||||
else
|
else
|
||||||
"#{remote}/#{path}"
|
"#{remote}/#{path}"
|
||||||
end
|
end
|
||||||
|
@ -21,7 +21,7 @@ module Hardware
|
|||||||
return :dunno unless intel?
|
return :dunno unless intel?
|
||||||
|
|
||||||
# See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers
|
# See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers
|
||||||
# and https://github.com/llvm-mirror/llvm/blob/master/lib/Support/Host.cpp
|
# and https://github.com/llvm-mirror/llvm/blob/HEAD/lib/Support/Host.cpp
|
||||||
# and https://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures#Roadmap
|
# and https://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures#Roadmap
|
||||||
cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i
|
cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i
|
||||||
cpu_model = cpuinfo[/^model\s*: ([0-9]+)/, 1].to_i
|
cpu_model = cpuinfo[/^model\s*: ([0-9]+)/, 1].to_i
|
||||||
|
@ -80,7 +80,7 @@ class Keg
|
|||||||
).map { |dir| HOMEBREW_PREFIX/dir }.sort.uniq.freeze
|
).map { |dir| HOMEBREW_PREFIX/dir }.sort.uniq.freeze
|
||||||
|
|
||||||
# Keep relatively in sync with
|
# Keep relatively in sync with
|
||||||
# https://github.com/Homebrew/install/blob/master/install
|
# https://github.com/Homebrew/install/blob/HEAD/install
|
||||||
MUST_EXIST_DIRECTORIES = (MUST_EXIST_SUBDIRECTORIES + [
|
MUST_EXIST_DIRECTORIES = (MUST_EXIST_SUBDIRECTORIES + [
|
||||||
HOMEBREW_CELLAR,
|
HOMEBREW_CELLAR,
|
||||||
].sort.uniq).freeze
|
].sort.uniq).freeze
|
||||||
|
@ -43,14 +43,14 @@ module OS
|
|||||||
def latest_stable_version
|
def latest_stable_version
|
||||||
# TODO: bump version when new macOS is released and also update
|
# TODO: bump version when new macOS is released and also update
|
||||||
# references in docs/Installation.md and
|
# references in docs/Installation.md and
|
||||||
# https://github.com/Homebrew/install/blob/master/install
|
# https://github.com/Homebrew/install/blob/HEAD/install
|
||||||
Version.new "10.15"
|
Version.new "10.15"
|
||||||
end
|
end
|
||||||
|
|
||||||
def outdated_release?
|
def outdated_release?
|
||||||
# TODO: bump version when new macOS is released and also update
|
# TODO: bump version when new macOS is released and also update
|
||||||
# references in docs/Installation.md and
|
# references in docs/Installation.md and
|
||||||
# https://github.com/Homebrew/install/blob/master/install
|
# https://github.com/Homebrew/install/blob/HEAD/install
|
||||||
version < "10.13"
|
version < "10.13"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ module RuboCop
|
|||||||
include CaskHelp
|
include CaskHelp
|
||||||
|
|
||||||
REFERENCE_URL =
|
REFERENCE_URL =
|
||||||
"https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \
|
"https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/" \
|
||||||
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment"
|
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment"
|
||||||
|
|
||||||
COMMENT_FORMAT = /# [^ ]+ was verified as official when first introduced to the cask/.freeze
|
COMMENT_FORMAT = /# [^ ]+ was verified as official when first introduced to the cask/.freeze
|
||||||
|
@ -6,7 +6,7 @@ module RuboCop
|
|||||||
module Cop
|
module Cop
|
||||||
module Cask
|
module Cask
|
||||||
# This cop checks that a cask's stanzas are grouped correctly.
|
# This cop checks that a cask's stanzas are grouped correctly.
|
||||||
# See https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
|
# See https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order
|
||||||
# for more info.
|
# for more info.
|
||||||
class StanzaGrouping < Cop
|
class StanzaGrouping < Cop
|
||||||
extend Forwardable
|
extend Forwardable
|
||||||
|
@ -6,7 +6,7 @@ module RuboCop
|
|||||||
module Cop
|
module Cop
|
||||||
module Cask
|
module Cask
|
||||||
# This cop checks that a cask's stanzas are ordered correctly.
|
# This cop checks that a cask's stanzas are ordered correctly.
|
||||||
# See https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
|
# See https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order
|
||||||
# for more info.
|
# for more info.
|
||||||
class StanzaOrder < Cop
|
class StanzaOrder < Cop
|
||||||
extend Forwardable
|
extend Forwardable
|
||||||
|
@ -15,7 +15,7 @@ describe Cask::Cmd::Info, :cask do
|
|||||||
local-caffeine: 1.2.3
|
local-caffeine: 1.2.3
|
||||||
https://brew.sh/
|
https://brew.sh/
|
||||||
Not installed
|
Not installed
|
||||||
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
|
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/local-caffeine.rb
|
||||||
==> Name
|
==> Name
|
||||||
None
|
None
|
||||||
==> Artifacts
|
==> Artifacts
|
||||||
@ -30,7 +30,7 @@ describe Cask::Cmd::Info, :cask do
|
|||||||
with-auto-updates: 1.0 (auto_updates)
|
with-auto-updates: 1.0 (auto_updates)
|
||||||
https://brew.sh/autoupdates
|
https://brew.sh/autoupdates
|
||||||
Not installed
|
Not installed
|
||||||
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-auto-updates.rb
|
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-auto-updates.rb
|
||||||
==> Name
|
==> Name
|
||||||
AutoUpdates
|
AutoUpdates
|
||||||
==> Artifacts
|
==> Artifacts
|
||||||
@ -44,7 +44,7 @@ describe Cask::Cmd::Info, :cask do
|
|||||||
local-caffeine: 1.2.3
|
local-caffeine: 1.2.3
|
||||||
https://brew.sh/
|
https://brew.sh/
|
||||||
Not installed
|
Not installed
|
||||||
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
|
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/local-caffeine.rb
|
||||||
==> Name
|
==> Name
|
||||||
None
|
None
|
||||||
==> Artifacts
|
==> Artifacts
|
||||||
@ -53,7 +53,7 @@ describe Cask::Cmd::Info, :cask do
|
|||||||
local-transmission: 2.61
|
local-transmission: 2.61
|
||||||
https://brew.sh/
|
https://brew.sh/
|
||||||
Not installed
|
Not installed
|
||||||
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-transmission.rb
|
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/local-transmission.rb
|
||||||
==> Name
|
==> Name
|
||||||
Transmission
|
Transmission
|
||||||
==> Artifacts
|
==> Artifacts
|
||||||
@ -75,7 +75,7 @@ describe Cask::Cmd::Info, :cask do
|
|||||||
with-caveats: 1.2.3
|
with-caveats: 1.2.3
|
||||||
https://brew.sh/
|
https://brew.sh/
|
||||||
Not installed
|
Not installed
|
||||||
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-caveats.rb
|
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-caveats.rb
|
||||||
==> Name
|
==> Name
|
||||||
None
|
None
|
||||||
==> Artifacts
|
==> Artifacts
|
||||||
@ -100,7 +100,7 @@ describe Cask::Cmd::Info, :cask do
|
|||||||
with-conditional-caveats: 1.2.3
|
with-conditional-caveats: 1.2.3
|
||||||
https://brew.sh/
|
https://brew.sh/
|
||||||
Not installed
|
Not installed
|
||||||
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-conditional-caveats.rb
|
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-conditional-caveats.rb
|
||||||
==> Name
|
==> Name
|
||||||
None
|
None
|
||||||
==> Artifacts
|
==> Artifacts
|
||||||
@ -115,7 +115,7 @@ describe Cask::Cmd::Info, :cask do
|
|||||||
with-languages: 1.2.3
|
with-languages: 1.2.3
|
||||||
https://brew.sh/
|
https://brew.sh/
|
||||||
Not installed
|
Not installed
|
||||||
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-languages.rb
|
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-languages.rb
|
||||||
==> Name
|
==> Name
|
||||||
None
|
None
|
||||||
==> Languages
|
==> Languages
|
||||||
@ -132,7 +132,7 @@ describe Cask::Cmd::Info, :cask do
|
|||||||
without-languages: 1.2.3
|
without-languages: 1.2.3
|
||||||
https://brew.sh/
|
https://brew.sh/
|
||||||
Not installed
|
Not installed
|
||||||
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/without-languages.rb
|
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/without-languages.rb
|
||||||
==> Name
|
==> Name
|
||||||
None
|
None
|
||||||
==> Artifacts
|
==> Artifacts
|
||||||
|
@ -24,13 +24,13 @@ describe Homebrew do
|
|||||||
|
|
||||||
specify "::github_remote_path" do
|
specify "::github_remote_path" do
|
||||||
expect(subject.github_remote_path(remote, "Formula/git.rb"))
|
expect(subject.github_remote_path(remote, "Formula/git.rb"))
|
||||||
.to eq("https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb")
|
.to eq("https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb")
|
||||||
|
|
||||||
expect(subject.github_remote_path("#{remote}.git", "Formula/git.rb"))
|
expect(subject.github_remote_path("#{remote}.git", "Formula/git.rb"))
|
||||||
.to eq("https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb")
|
.to eq("https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb")
|
||||||
|
|
||||||
expect(subject.github_remote_path("git@github.com:user/repo", "foo.rb"))
|
expect(subject.github_remote_path("git@github.com:user/repo", "foo.rb"))
|
||||||
.to eq("https://github.com/user/repo/blob/master/foo.rb")
|
.to eq("https://github.com/user/repo/blob/HEAD/foo.rb")
|
||||||
|
|
||||||
expect(subject.github_remote_path("https://mywebsite.com", "foo/bar.rb"))
|
expect(subject.github_remote_path("https://mywebsite.com", "foo/bar.rb"))
|
||||||
.to eq("https://mywebsite.com/foo/bar.rb")
|
.to eq("https://mywebsite.com/foo/bar.rb")
|
||||||
|
@ -110,7 +110,7 @@ describe RuboCop::Cop::Cask::HomepageMatchesUrl do
|
|||||||
[{
|
[{
|
||||||
message: "`# brew.sh was verified as official` does not " \
|
message: "`# brew.sh was verified as official` does not " \
|
||||||
"match the expected comment format. For details, see " \
|
"match the expected comment format. For details, see " \
|
||||||
"https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \
|
"https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/" \
|
||||||
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment",
|
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment",
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 2,
|
line: 2,
|
||||||
@ -188,7 +188,7 @@ describe RuboCop::Cop::Cask::HomepageMatchesUrl do
|
|||||||
[{
|
[{
|
||||||
message: "`brew.sh` does not match `example.org`, a comment " \
|
message: "`brew.sh` does not match `example.org`, a comment " \
|
||||||
"has to be added above the `url` stanza. For details, see " \
|
"has to be added above the `url` stanza. For details, see " \
|
||||||
"https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \
|
"https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/" \
|
||||||
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment",
|
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment",
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 2,
|
line: 2,
|
||||||
|
@ -19,7 +19,7 @@ Second, read the [Troubleshooting Checklist](https://docs.brew.sh/Troubleshootin
|
|||||||
**If you don't read these it will take us far longer to help you with your problem.**
|
**If you don't read these it will take us far longer to help you with your problem.**
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
We'd love you to contribute to Homebrew. First, please read our [Contribution Guide](CONTRIBUTING.md) and [Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct).
|
We'd love you to contribute to Homebrew. First, please read our [Contribution Guide](CONTRIBUTING.md) and [Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct).
|
||||||
|
|
||||||
We explicitly welcome contributions from people who have never contributed to open-source before: we were all beginners once! We can help build on a partially working pull request with the aim of getting it merged. We are also actively seeking to diversify our contributors and especially welcome contributions from women from all backgrounds and people of colour.
|
We explicitly welcome contributions from people who have never contributed to open-source before: we were all beginners once! We can help build on a partially working pull request with the aim of getting it merged. We are also actively seeking to diversify our contributors and especially welcome contributions from women from all backgrounds and people of colour.
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ Homebrew's analytics are sent throughout Homebrew's execution to Google Analytic
|
|||||||
Summaries of installation and error analytics are publicly available [here](https://brew.sh/analytics/). A JSON API is also available.
|
Summaries of installation and error analytics are publicly available [here](https://brew.sh/analytics/). A JSON API is also available.
|
||||||
|
|
||||||
## How?
|
## How?
|
||||||
The code is viewable in [`analytics.rb`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/utils/analytics.rb) and [`analytics.sh`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/utils/analytics.sh). They are done in a separate background process and fail fast to avoid delaying any execution. They will fail immediately and silently if you have no network connection.
|
The code is viewable in [`analytics.rb`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/utils/analytics.rb) and [`analytics.sh`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/utils/analytics.sh). They are done in a separate background process and fail fast to avoid delaying any execution. They will fail immediately and silently if you have no network connection.
|
||||||
|
|
||||||
## Opting out
|
## Opting out
|
||||||
Homebrew analytics helps us maintainers and leaving it on is appreciated. However, if you want to opt out of Homebrew's analytics, you can set this variable in your environment:
|
Homebrew analytics helps us maintainers and leaving it on is appreciated. However, if you want to opt out of Homebrew's analytics, you can set this variable in your environment:
|
||||||
|
@ -39,7 +39,7 @@ For example, see the [header of `brew-services.rb`](https://github.com/Homebrew/
|
|||||||
|
|
||||||
### homebrew-livecheck
|
### homebrew-livecheck
|
||||||
Check if there is a new upstream version of a formula.
|
Check if there is a new upstream version of a formula.
|
||||||
See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/master/README.md) for more info and usage.
|
See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/HEAD/README.md) for more info and usage.
|
||||||
|
|
||||||
Install using:
|
Install using:
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ brew tap homebrew/livecheck
|
|||||||
|
|
||||||
### homebrew-command-not-found
|
### homebrew-command-not-found
|
||||||
Ubuntu's `command-not-found equivalent` for Homebrew.
|
Ubuntu's `command-not-found equivalent` for Homebrew.
|
||||||
See the [`README`](https://github.com/Homebrew/homebrew-command-not-found/blob/master/README.md) for more info and usage.
|
See the [`README`](https://github.com/Homebrew/homebrew-command-not-found/blob/HEAD/README.md) for more info and usage.
|
||||||
|
|
||||||
Install using:
|
Install using:
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ brew tap homebrew/command-not-found
|
|||||||
|
|
||||||
### homebrew-aliases
|
### homebrew-aliases
|
||||||
Allows you to alias your Homebrew commands.
|
Allows you to alias your Homebrew commands.
|
||||||
See the [`README`](https://github.com/Homebrew/homebrew-aliases/blob/master/README.md) for more info and usage.
|
See the [`README`](https://github.com/Homebrew/homebrew-aliases/blob/HEAD/README.md) for more info and usage.
|
||||||
|
|
||||||
Install using:
|
Install using:
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ the launchctl PATH for *all users*. For earlier versions of macOS, see
|
|||||||
[this page](https://developer.apple.com/legacy/library/qa/qa1067/_index.html).
|
[this page](https://developer.apple.com/legacy/library/qa/qa1067/_index.html).
|
||||||
|
|
||||||
## How do I contribute to Homebrew?
|
## How do I contribute to Homebrew?
|
||||||
Read our [contribution guidelines](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md#contributing-to-homebrew).
|
Read our [contribution guidelines](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md#contributing-to-homebrew).
|
||||||
|
|
||||||
## Why do you compile everything?
|
## Why do you compile everything?
|
||||||
Homebrew provides pre-compiled versions for many formulae. These
|
Homebrew provides pre-compiled versions for many formulae. These
|
||||||
|
@ -21,7 +21,7 @@ Homebrew uses Git for downloading updates and contributing to the project.
|
|||||||
|
|
||||||
Homebrew installs to the `Cellar` and then symlinks some of the installation into `/usr/local` so that other programs can see what's going on. We suggest you `brew ls` a few of the kegs in your Cellar to see how it is all arranged.
|
Homebrew installs to the `Cellar` and then symlinks some of the installation into `/usr/local` so that other programs can see what's going on. We suggest you `brew ls` a few of the kegs in your Cellar to see how it is all arranged.
|
||||||
|
|
||||||
Packages are installed according to their formulae, which live in `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula`. Check out a simple one, e.g. `brew edit etl` (or [`etl`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/etl.rb)) or a more advanced one, e.g. `brew edit git` (or [`git`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb)).
|
Packages are installed according to their formulae, which live in `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula`. Check out a simple one, e.g. `brew edit etl` (or [`etl`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/etl.rb)) or a more advanced one, e.g. `brew edit git` (or [`git`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb)).
|
||||||
|
|
||||||
## Basic instructions
|
## Basic instructions
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ Before submitting a new formula make sure your package:
|
|||||||
* has a stable, tagged version (i.e. not just a GitHub repository with no versions)
|
* has a stable, tagged version (i.e. not just a GitHub repository with no versions)
|
||||||
* passes all `brew audit --new-formula <formula>` tests
|
* passes all `brew audit --new-formula <formula>` tests
|
||||||
|
|
||||||
Before submitting a new formula make sure you read over our [contribution guidelines](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md#contributing-to-homebrew).
|
Before submitting a new formula make sure you read over our [contribution guidelines](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md#contributing-to-homebrew).
|
||||||
|
|
||||||
### Grab the URL
|
### Grab the URL
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ to avoid conflicting with the system so sometimes formulae need to
|
|||||||
have environment variables set or special configuration flags passed
|
have environment variables set or special configuration flags passed
|
||||||
to locate our OpenSSL. You can see this mechanism in the
|
to locate our OpenSSL. You can see this mechanism in the
|
||||||
[`clamav`](https://github.com/Homebrew/homebrew-core/blob/89c4574ef1a6d15e92196637ff315a0a4bb3e289/Formula/clamav.rb#L37)
|
[`clamav`](https://github.com/Homebrew/homebrew-core/blob/89c4574ef1a6d15e92196637ff315a0a4bb3e289/Formula/clamav.rb#L37)
|
||||||
formula. Usually this is unnecessary because Homebrew sets up our [build environment](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/extend/ENV/super.rb)
|
formula. Usually this is unnecessary because Homebrew sets up our [build environment](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/extend/ENV/super.rb)
|
||||||
to favour finding [`keg_only`](https://rubydoc.brew.sh/Formula#keg_only-class_method) formulae first.
|
to favour finding [`keg_only`](https://rubydoc.brew.sh/Formula#keg_only-class_method) formulae first.
|
||||||
|
|
||||||
**Important:** `$(brew --prefix)/bin` is NOT on the `PATH` during formula installation. If you have dependencies at build time, you must specify them and `brew` will add them to the `PATH` or create a [`Requirement`](https://rubydoc.brew.sh/Requirement).
|
**Important:** `$(brew --prefix)/bin` is NOT on the `PATH` during formula installation. If you have dependencies at build time, you must specify them and `brew` will add them to the `PATH` or create a [`Requirement`](https://rubydoc.brew.sh/Requirement).
|
||||||
@ -168,9 +168,9 @@ description can be overridden using the normal option syntax (in this case, the
|
|||||||
|
|
||||||
Sometimes there’s hard conflict between formulae, and it can’t be avoided or circumvented with [`keg_only`](https://rubydoc.brew.sh/Formula#keg_only-class_method).
|
Sometimes there’s hard conflict between formulae, and it can’t be avoided or circumvented with [`keg_only`](https://rubydoc.brew.sh/Formula#keg_only-class_method).
|
||||||
|
|
||||||
A good example formula for minor conflict is [`mbedtls`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/mbedtls.rb), which ships and compiles a "Hello World" executable. This is obviously non-essential to `mbedtls`’s functionality, and conflict with the popular GNU [`hello`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/hello.rb) formula would be overkill, so we just [remove it](https://github.com/Homebrew/homebrew-core/blob/966273060ad507fea490bd931971963de8b1a1dc/Formula/mbedtls.rb#L30-L31) during the installation process.
|
A good example formula for minor conflict is [`mbedtls`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/mbedtls.rb), which ships and compiles a "Hello World" executable. This is obviously non-essential to `mbedtls`’s functionality, and conflict with the popular GNU [`hello`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/hello.rb) formula would be overkill, so we just [remove it](https://github.com/Homebrew/homebrew-core/blob/966273060ad507fea490bd931971963de8b1a1dc/Formula/mbedtls.rb#L30-L31) during the installation process.
|
||||||
|
|
||||||
[`pdftohtml`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/pdftohtml.rb) provides an example of a serious
|
[`pdftohtml`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/pdftohtml.rb) provides an example of a serious
|
||||||
conflict, where both formula ship an identically-named binary that is essential to functionality, so a [`conflicts_with`](https://rubydoc.brew.sh/Formula#conflicts_with-class_method) is preferable.
|
conflict, where both formula ship an identically-named binary that is essential to functionality, so a [`conflicts_with`](https://rubydoc.brew.sh/Formula#conflicts_with-class_method) is preferable.
|
||||||
|
|
||||||
As a general rule, [`conflicts_with`](https://rubydoc.brew.sh/Formula#conflicts_with-class_method) should be a last-resort option. It’s a fairly blunt instrument.
|
As a general rule, [`conflicts_with`](https://rubydoc.brew.sh/Formula#conflicts_with-class_method) should be a last-resort option. It’s a fairly blunt instrument.
|
||||||
@ -235,7 +235,7 @@ class Foo < Formula
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
[`jrnl`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/jrnl.rb) is an example of a formula that does this well. The end result means the user doesn't have to use `pip` or Python and can just run `jrnl`.
|
[`jrnl`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/jrnl.rb) is an example of a formula that does this well. The end result means the user doesn't have to use `pip` or Python and can just run `jrnl`.
|
||||||
|
|
||||||
[homebrew-pypi-poet](https://github.com/tdsmith/homebrew-pypi-poet) can help you generate [`resource`](https://rubydoc.brew.sh/Formula#resource-class_method) stanzas for the dependencies of your Python application.
|
[homebrew-pypi-poet](https://github.com/tdsmith/homebrew-pypi-poet) can help you generate [`resource`](https://rubydoc.brew.sh/Formula#resource-class_method) stanzas for the dependencies of your Python application.
|
||||||
|
|
||||||
@ -259,9 +259,9 @@ function. The environment variable `HOME` is set to [`testpath`](https://rubydoc
|
|||||||
|
|
||||||
We want tests that don't require any user input and test the basic functionality of the application. For example `foo build-foo input.foo` is a good test and (despite their widespread use) `foo --version` and `foo --help` are bad tests. However, a bad test is better than no test at all.
|
We want tests that don't require any user input and test the basic functionality of the application. For example `foo build-foo input.foo` is a good test and (despite their widespread use) `foo --version` and `foo --help` are bad tests. However, a bad test is better than no test at all.
|
||||||
|
|
||||||
See [`cmake`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/cmake.rb) for an example of a formula with a good test. The formula writes a basic `CMakeLists.txt` file into the test directory then calls CMake to generate Makefiles. This test checks that CMake doesn't e.g. segfault during basic operation.
|
See [`cmake`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/cmake.rb) for an example of a formula with a good test. The formula writes a basic `CMakeLists.txt` file into the test directory then calls CMake to generate Makefiles. This test checks that CMake doesn't e.g. segfault during basic operation.
|
||||||
|
|
||||||
You can check that the output is as expected with `assert_equal` or `assert_match` on the output of shell_output such as in this example from the [envv formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/envv.rb):
|
You can check that the output is as expected with `assert_equal` or `assert_match` on the output of shell_output such as in this example from the [envv formula](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/envv.rb):
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
assert_equal "mylist=A:C; export mylist", shell_output("#{bin}/envv del mylist B").strip
|
assert_equal "mylist=A:C; export mylist", shell_output("#{bin}/envv del mylist B").strip
|
||||||
@ -275,7 +275,7 @@ assert_predicate testpath/"output.txt", :exist?
|
|||||||
|
|
||||||
Some advice for specific cases:
|
Some advice for specific cases:
|
||||||
* If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
|
* If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
|
||||||
A good example is [`tinyxml2`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/tinyxml2.rb), which writes a small C++ source file into the test directory, compiles and links it against the tinyxml2 library and finally checks that the resulting program runs successfully.
|
A good example is [`tinyxml2`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/tinyxml2.rb), which writes a small C++ source file into the test directory, compiles and links it against the tinyxml2 library and finally checks that the resulting program runs successfully.
|
||||||
* If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
|
* If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
|
||||||
* If the software cannot function without credentials or requires a virtual machine, docker instance, etc. to run, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected. This is prefered over mocking a dependency.
|
* If the software cannot function without credentials or requires a virtual machine, docker instance, etc. to run, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected. This is prefered over mocking a dependency.
|
||||||
* Homebrew comes with a number of [standard test fixtures](https://github.com/Homebrew/brew/tree/master/Library/Homebrew/test/support/fixtures), including numerous sample images, sounds, and documents in various formats. You can get the file path to a test fixture with `test_fixtures("test.svg")`.
|
* Homebrew comes with a number of [standard test fixtures](https://github.com/Homebrew/brew/tree/master/Library/Homebrew/test/support/fixtures), including numerous sample images, sounds, and documents in various formats. You can get the file path to a test fixture with `test_fixtures("test.svg")`.
|
||||||
@ -322,7 +322,7 @@ If you’re not sure about the name, check its homepage, Wikipedia page and [wha
|
|||||||
|
|
||||||
When Homebrew already has a formula called `foo` we typically do not accept requests to replace that formula with something else also named `foo`. This is to avoid both confusing and surprising users’ expectations.
|
When Homebrew already has a formula called `foo` we typically do not accept requests to replace that formula with something else also named `foo`. This is to avoid both confusing and surprising users’ expectations.
|
||||||
|
|
||||||
When two formulae share an upstream name, e.g. [AESCrypt](https://github.com/Homebrew/homebrew-core/blob/master/Formula/aescrypt.rb) and [AES Crypt](https://github.com/Homebrew/homebrew-core/blob/master/Formula/aescrypt-packetizer.rb) the newer formula must typically adapt its name to avoid conflict with the current formula.
|
When two formulae share an upstream name, e.g. [AESCrypt](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/aescrypt.rb) and [AES Crypt](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/aescrypt-packetizer.rb) the newer formula must typically adapt its name to avoid conflict with the current formula.
|
||||||
|
|
||||||
If you’re *still* not sure, just commit. We’ll apply some arbitrary rule and make a decision 😉.
|
If you’re *still* not sure, just commit. We’ll apply some arbitrary rule and make a decision 😉.
|
||||||
|
|
||||||
@ -740,9 +740,9 @@ Homebrew provides two formula DSL methods for launchd plist files:
|
|||||||
|
|
||||||
Homebrew has multiple levels of environment variable filtering which affects variables available to formulae.
|
Homebrew has multiple levels of environment variable filtering which affects variables available to formulae.
|
||||||
|
|
||||||
Firstly, the overall environment in which Homebrew runs is filtered to avoid environment contamination breaking from-source builds (<https://github.com/Homebrew/brew/issues/932>). In particular, this process filters all but the given whitelisted variables, but allows environment variables prefixed with `HOMEBREW_`. The specific implementation can be seen in [`bin/brew`](https://github.com/Homebrew/brew/blob/master/bin/brew).
|
Firstly, the overall environment in which Homebrew runs is filtered to avoid environment contamination breaking from-source builds (<https://github.com/Homebrew/brew/issues/932>). In particular, this process filters all but the given whitelisted variables, but allows environment variables prefixed with `HOMEBREW_`. The specific implementation can be seen in [`bin/brew`](https://github.com/Homebrew/brew/blob/HEAD/bin/brew).
|
||||||
|
|
||||||
The second level of filtering removes sensitive environment variables (such as credentials like keys, passwords or tokens) to avoid malicious subprocesses obtaining them (<https://github.com/Homebrew/brew/pull/2524>). This has the effect of preventing any such variables from reaching a formula's Ruby code as they are filtered before it is called. The specific implementation can be seen in the [`ENV.clear_sensitive_environment!` method](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/extend/ENV.rb).
|
The second level of filtering removes sensitive environment variables (such as credentials like keys, passwords or tokens) to avoid malicious subprocesses obtaining them (<https://github.com/Homebrew/brew/pull/2524>). This has the effect of preventing any such variables from reaching a formula's Ruby code as they are filtered before it is called. The specific implementation can be seen in the [`ENV.clear_sensitive_environment!` method](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/extend/ENV.rb).
|
||||||
|
|
||||||
In summary, environment variables used by a formula need to conform to these filtering rules in order to be available.
|
In summary, environment variables used by a formula need to conform to these filtering rules in order to be available.
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
4. Members may be dismissed by majority vote of the Project Leadership Committee and removed from the Homebrew organisation on GitHub. Removed members may be reinstated by the usual admission process.
|
4. Members may be dismissed by majority vote of the Project Leadership Committee and removed from the Homebrew organisation on GitHub. Removed members may be reinstated by the usual admission process.
|
||||||
|
|
||||||
5. All members will follow the [Homebrew Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct). Changes to the code of conduct must be approved by the PLC.
|
5. All members will follow the [Homebrew Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct). Changes to the code of conduct must be approved by the PLC.
|
||||||
|
|
||||||
6. Homebrew members will comply with the Software Freedom Conservancy's [conflict of interest policy](https://sfconservancy.org/projects/policies/conflict-of-interest-policy.html).
|
6. Homebrew members will comply with the Software Freedom Conservancy's [conflict of interest policy](https://sfconservancy.org/projects/policies/conflict-of-interest-policy.html).
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ correct repository:
|
|||||||
|
|
||||||
> Thanks for your PR.
|
> Thanks for your PR.
|
||||||
>
|
>
|
||||||
> However, this formula is not Linux-specific. Its new versions are merged from the [Homebrew/homebrew-core](https://github.com/Homebrew/homebrew-core) repository daily [as documented in CONTRIBUTING.md](https://github.com/Homebrew/linuxbrew-core/blob/master/CONTRIBUTING.md). Please submit this change as a PR to that repository.
|
> However, this formula is not Linux-specific. Its new versions are merged from the [Homebrew/homebrew-core](https://github.com/Homebrew/homebrew-core) repository daily [as documented in CONTRIBUTING.md](https://github.com/Homebrew/linuxbrew-core/blob/HEAD/CONTRIBUTING.md). Please submit this change as a PR to that repository.
|
||||||
>
|
>
|
||||||
> We look forward to your PR against Homebrew/homebrew-core for the next version bump!
|
> We look forward to your PR against Homebrew/homebrew-core for the next version bump!
|
||||||
|
|
||||||
|
@ -165,6 +165,6 @@ All communication should ideally occur in public on GitHub. Where this is not po
|
|||||||
|
|
||||||
This makes it easier for other maintainers, contributors and users to follow along with what we're doing (and, more importantly, why we're doing it) and means that decisions have a linkable URL.
|
This makes it easier for other maintainers, contributors and users to follow along with what we're doing (and, more importantly, why we're doing it) and means that decisions have a linkable URL.
|
||||||
|
|
||||||
All maintainers (and lead maintainer) communication through any medium is bound by [Homebrew's Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct). Abusive behaviour towards other maintainers, contributors or users will not be tolerated; the maintainer will be given a warning and if their behaviour continues they will be removed as a maintainer.
|
All maintainers (and lead maintainer) communication through any medium is bound by [Homebrew's Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct). Abusive behaviour towards other maintainers, contributors or users will not be tolerated; the maintainer will be given a warning and if their behaviour continues they will be removed as a maintainer.
|
||||||
|
|
||||||
Maintainers should feel free to pleasantly disagree with the work and decisions of other maintainers. Healthy, friendly, technical disagreement between maintainers is actively encouraged and should occur in public on the issue tracker to make the project better. Interpersonal issues should be handled privately in Slack, ideally with moderation. If work or decisions are insufficiently documented or explained any maintainer or contributor should feel free to ask for clarification. No maintainer may ever justify a decision with e.g. "because I say so" or "it was I who did X" alone. Off-topic discussions on the issue tracker, [bike-shedding](https://en.wikipedia.org/wiki/Law_of_triviality) and personal attacks are forbidden.
|
Maintainers should feel free to pleasantly disagree with the work and decisions of other maintainers. Healthy, friendly, technical disagreement between maintainers is actively encouraged and should occur in public on the issue tracker to make the project better. Interpersonal issues should be handled privately in Slack, ideally with moderation. If work or decisions are insufficiently documented or explained any maintainer or contributor should feel free to ask for clarification. No maintainer may ever justify a decision with e.g. "because I say so" or "it was I who did X" alone. Off-topic discussions on the issue tracker, [bike-shedding](https://en.wikipedia.org/wiki/Law_of_triviality) and personal attacks are forbidden.
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
This document explains how to successfully use Python in a Homebrew formula.
|
This document explains how to successfully use Python in a Homebrew formula.
|
||||||
|
|
||||||
Homebrew draws a distinction between Python **applications** and Python **libraries**. The difference is that users generally do not care that applications are written in Python; it is unusual that a user would expect to be able to `import foo` after installing an application. Examples of applications are [`ansible`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/ansible.rb) and [`jrnl`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/jrnl.rb).
|
Homebrew draws a distinction between Python **applications** and Python **libraries**. The difference is that users generally do not care that applications are written in Python; it is unusual that a user would expect to be able to `import foo` after installing an application. Examples of applications are [`ansible`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/ansible.rb) and [`jrnl`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/jrnl.rb).
|
||||||
|
|
||||||
Python libraries exist to be imported by other Python modules; they are often dependencies of Python applications. They are usually no more than incidentally useful in a terminal. Examples of libraries are [`py2cairo`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/py2cairo.rb) and the bindings that are installed by [`protobuf`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/protobuf.rb).
|
Python libraries exist to be imported by other Python modules; they are often dependencies of Python applications. They are usually no more than incidentally useful in a terminal. Examples of libraries are [`py2cairo`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/py2cairo.rb) and the bindings that are installed by [`protobuf`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/protobuf.rb).
|
||||||
|
|
||||||
Bindings are a special case of libraries that allow Python code to interact with a library or application implemented in another language.
|
Bindings are a special case of libraries that allow Python code to interact with a library or application implemented in another language.
|
||||||
|
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
## Supported Xcode versions
|
## Supported Xcode versions
|
||||||
Homebrew supports and recommends the latest Xcode and/or Command Line
|
Homebrew supports and recommends the latest Xcode and/or Command Line
|
||||||
Tools available for your platform (see `OS::Mac::Xcode.latest_version` and `OS::Mac::CLT.latest_version` in [`Library/Homebrew/os/mac/xcode.rb`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/os/mac/xcode.rb)).
|
Tools available for your platform (see `OS::Mac::Xcode.latest_version` and `OS::Mac::CLT.latest_version` in [`Library/Homebrew/os/mac/xcode.rb`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/os/mac/xcode.rb)).
|
||||||
|
|
||||||
## Updating for new Xcode releases
|
## Updating for new Xcode releases
|
||||||
When a new Xcode release is made, the following things need to be
|
When a new Xcode release is made, the following things need to be
|
||||||
updated:
|
updated:
|
||||||
|
|
||||||
* In [`Library/Homebrew/os/mac/xcode.rb`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/os/mac/xcode.rb)
|
* In [`Library/Homebrew/os/mac/xcode.rb`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/os/mac/xcode.rb)
|
||||||
* `OS::Mac::Xcode.latest_version`
|
* `OS::Mac::Xcode.latest_version`
|
||||||
* `OS::Mac::CLT.latest_version`
|
* `OS::Mac::CLT.latest_version`
|
||||||
* `OS::Mac::Xcode.detect_version_from_clang_version`
|
* `OS::Mac::Xcode.detect_version_from_clang_version`
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
extends: substitution
|
extends: substitution
|
||||||
message: Use '%s'
|
message: Use '%s'
|
||||||
ignorecase: false
|
ignorecase: false
|
||||||
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#style-and-usage'
|
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#style-and-usage'
|
||||||
level: error
|
level: error
|
||||||
nonword: true
|
nonword: true
|
||||||
swap:
|
swap:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
extends: existence
|
extends: existence
|
||||||
message: 'No Oxford commas!'
|
message: 'No Oxford commas!'
|
||||||
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#typographical-conventions'
|
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#typographical-conventions'
|
||||||
scope: sentence
|
scope: sentence
|
||||||
level: warning
|
level: warning
|
||||||
tokens:
|
tokens:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
extends: existence
|
extends: existence
|
||||||
message: Avoid gender-specific language when not necessary.
|
message: Avoid gender-specific language when not necessary.
|
||||||
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#personal-pronouns'
|
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#personal-pronouns'
|
||||||
level: warning
|
level: warning
|
||||||
ignorecase: true
|
ignorecase: true
|
||||||
tokens:
|
tokens:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
extends: existence
|
extends: existence
|
||||||
message: "'%s' should have one space."
|
message: "'%s' should have one space."
|
||||||
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#typographical-conventions'
|
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#typographical-conventions'
|
||||||
level: error
|
level: error
|
||||||
nonword: true
|
nonword: true
|
||||||
tokens:
|
tokens:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
extends: substitution
|
extends: substitution
|
||||||
message: Use '%s' instead of '%s'.
|
message: Use '%s' instead of '%s'.
|
||||||
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#terminology-words-and-word-styling'
|
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#terminology-words-and-word-styling'
|
||||||
level: error
|
level: error
|
||||||
scope: $paragraph
|
scope: $paragraph
|
||||||
swap:
|
swap:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
extends: existence
|
extends: existence
|
||||||
message: 'No "TM", ™, SM, ©, ®, or other explicit indicators of rights ownership or trademarks'
|
message: 'No "TM", ™, SM, ©, ®, or other explicit indicators of rights ownership or trademarks'
|
||||||
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#typographical-conventions'
|
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#typographical-conventions'
|
||||||
level: error
|
level: error
|
||||||
nonword: true
|
nonword: true
|
||||||
tokens:
|
tokens:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user