115 Commits

Author SHA1 Message Date
Mike McQuaid
9f33a9b1be
brew.sh: improve Docker whitelist on Azure pipelines. 2019-03-23 12:38:55 +00:00
Mike McQuaid
c9cdc2537f
brew.sh: don’t always autoupdate with no params.
Only `brew upgrade` and `brew cask upgrade` actually do anything if no additional parameters are specified. As a result, we don’t need to always update in those cases when we’re just showing help output anyway (as has been done for `brew tap`).
2019-03-21 18:04:14 +00:00
Mike McQuaid
fbaa0c35a6
bump-formula-pr: move auto-update to brew.sh
It’s always run anyway but this at least means Homebrew/brew and tap code is all up to date before we start querying any objects.

Fixes #5876.
2019-03-20 11:06:45 +00:00
Mike McQuaid
b3c33d6d51
brew.*: run Bundler immediately when needed.
This is needed to avoid gem conflicts when `global.rb` is loaded for some commands.
2019-02-21 12:56:22 +00:00
Steven Peters
58104ab838 tap: skip auto-update if called with no args 2019-02-18 20:45:26 -08:00
Mike McQuaid
31dd2ee856
brew.sh: allow Docker to run as root. 2019-02-15 10:03:53 +00:00
David
ad4b3b0e7f
Fix printf error on bash launch 2019-01-29 04:10:16 -05:00
Mike McQuaid
1aa8ad09e2
Deprecate macOS versions below Mavericks
And remove all dead/unneeded code.
2019-01-27 12:27:47 +00:00
Mike McQuaid
170c5493a4
Update deprecations
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00
Mike McQuaid
00dbb221b7
brew.sh: make update --preinstall exec.
This means that any new environment variables or changes to `bin/brew`
or `brew.sh` will be used in the new process. This also allows the
removal of various fallbacks from autoupdates from old versions.
2018-12-29 19:06:18 +00:00
Jonathan Chang
f1308332bc brew.sh: set correct log path [Linux] 2018-12-28 12:54:50 -08:00
EricFromCanada
0362e66a26 doctor: use minimum Git version set in brew.sh 2018-10-28 20:13:19 -04:00
EricFromCanada
7aa9956934 brew: check system-provided curl and git on Linux
Set HOMEBREW_FORCE_BREWED_CURL or HOMEBREW_FORCE_BREWED_GIT if the system-provided versions are missing or outdated, causing either to be installed on the next `brew update`.
2018-10-28 20:13:19 -04:00
Mike McQuaid
51af87f85f
Add HOMEBREW_FORCE_HOMEBREW_ON_LINUX
This serves a similar purpose to the HOMEBREW_FORCE_HOMEBREW_ORG
variable but applies to more settings.
2018-10-20 13:58:27 +01:00
Mike McQuaid
4feb851279
Fix brew style shellcheck warnings. 2018-10-07 22:08:59 +01:00
Mike McQuaid
25249f0114
shims/super/cc: detect High Sierra differently.
Don't rely on `RUBY_PLATFORM`'s kernel version as it's the machine that
Ruby was built on (10.5) for portable ruby.
2018-09-20 13:49:10 +01:00
Caleb Xu
25817d3589 Set HOMEBREW_BOTTLE_DEFAULT_DOMAIN based on operating system 2018-09-09 15:29:27 -04:00
Mike McQuaid
25b4d94b5c
Update minimum Git version.
This forces the use of Homebrew's Git on El Capitan and below.
Normally I'd remove the need for this but given we're weeks away from
El Capitan being unsupported it doesn't seem worth the effort to remove
useful functionality. Instead, let's warn about an old Git and
autoinstall Homebrew's Git wherever needed.

Fixes #4818.
2018-09-06 12:38:20 +01:00
William Woodruff
d30557ace6
brew.sh: Export HOMEBREW_GIT
Should have been exported like HOMEBREW_CURL.
2018-08-23 11:50:42 -04:00
William Woodruff
a7816eea6e
brew.sh: Remove whitespace 2018-08-17 15:20:05 -04:00
William Woodruff
60741c5c25
brew.sh: Integrate curl/git path checks into main checks 2018-08-17 15:17:14 -04:00
William Woodruff
479f82904b
brew.sh: Allow developers to specify curl/git paths
This introduces the HOMEBREW_CURL_PATH and HOMEBREW_GIT_PATH
variables, which are used to populate HOMEBREW_CURL and HOMEBREW_GIT,
respectively, when in developer mode (HOMEBREW_DEVELOPER).

Both paths are expected to be valid executables and must
have the executable bit set.
2018-08-17 14:59:07 -04:00
Markus Reiter
bdc2458c15 Always fetch at least the latest tag. 2018-08-11 00:46:29 +02:00
Mike McQuaid
6417332a3a Change Mojave bottle behaviour
Rather than relying on a `HOMEBREW_FORCE_BOTTLE` variable (which ends
up doing silly things like forcing bottle usage even when options are
provided) instead handle this at the `or_later` bottle detection
level so on prerelease versions of macOS any bottle looks like an
`or_later` bottle (unless various environment variables are set).

Fixes issues noted in:
https://github.com/Homebrew/brew/pull/4520#issuecomment-407229605
2018-07-24 09:25:32 +01:00
Mike McQuaid
3e93d4c6cf Add HOMEBREW_FORCE_BOTTLE variable
This does the equivalent of always passing `--force-bottle`. This will
be enabled by default on Mojave to allow people to avoid building
everything from source until our porting and bottling is a bit further
along.
2018-07-20 14:28:14 +01:00
Mike McQuaid
f46e4596c0 Cleanup HOMEBREW_TEMP handling
- Ensure that `HOMEBREW_TEMP` is only displayed in `brew config` when
  it's non-default.
- Attempt to create a missing `HOMEBREW_TEMP` directory rather than
  failing to `realpath`. Note this will still fail on permissions errors
  which is to be expected.
2018-07-03 15:41:33 +01:00
Mike McQuaid
09ee556833
Merge pull request #4397 from woodruffw/forbid-temp-prefix
brew.sh: Don't allow system tmp dirs as prefixes
2018-07-03 08:31:40 +01:00
William Woodruff
fd014153e6
brew.sh: Upcase var, tweak error language 2018-07-02 19:34:19 -04:00
William Woodruff
68d3dc1368
brew.sh: Only do tmpdir check on macOS 2018-07-01 19:21:50 -04:00
William Woodruff
bde7c6b82b
brew.sh: Use bashisms for default values 2018-07-01 19:19:55 -04:00
William Woodruff
039a4ee4b3
brew.sh: Move HOMEBREW_TEMP declaration
Additionally, assign HOMEBREW_TEMP based on the host
system (/tmp for Linux, /private/tmp for macOS).
2018-07-01 12:58:32 -04:00
William Woodruff
8e4aab92aa
brew.sh: Test HOMEBREW_TEMP, not hardcoded tmpdir 2018-06-30 12:21:32 -04:00
William Woodruff
c552e6596c
brew.sh: Remove trailing / from prefix in message 2018-06-30 11:53:29 -04:00
William Woodruff
b6a0b04a39
brew.sh: Tweak language 2018-06-30 11:13:39 -04:00
William Woodruff
42bd5448bc
brew.sh: Typo 2018-06-30 09:47:55 -04:00
William Woodruff
949c0cc47e
brew.sh: Use realpath to calculate tmpdir 2018-06-30 09:47:15 -04:00
William Woodruff
35138dd6dd
brew.sh: Don't allow system tmp dirs as prefixes 2018-06-30 09:38:15 -04:00
Mike McQuaid
376f67bf2c
Merge pull request #4390 from MikeMcQuaid/linkage-cache-default
linkage: enable cache by default.
2018-06-29 20:35:13 +01:00
Mike McQuaid
d3968fc327
Merge pull request #4391 from MikeMcQuaid/remove-unused-var
brew.sh: remove unused variable.
2018-06-29 20:34:57 +01:00
Mike McQuaid
ec6420229e brew.sh: remove unused variable.
As of #4377 this is no longer used.
2018-06-29 20:12:22 +01:00
Mike McQuaid
1bf3aacc79
Merge pull request #4389 from MikeMcQuaid/bintray-portable-ruby
portable-ruby: respect HOMEBREW_BOTTLE_DOMAIN variable.
2018-06-29 20:07:11 +01:00
Mike McQuaid
6f5c8b8509 linkage: enable cache by default.
This has not been causing any issues in CI or for `master` users so
let's now enable it by default for everyone.
2018-06-29 19:57:39 +01:00
Mike McQuaid
facd76bc51 portable-ruby: respect HOMEBREW_BOTTLE_DOMAIN variable.
This was requested in:
https://discourse.brew.sh/t/adding-additional-download-sources-to-homebrew/2446

With this change you can use e.g. Artifactory for Homebrew's portable
ruby.
2018-06-29 19:51:18 +01:00
Jack Haden-Enneking
9fd5a92ff6 Implement HOMEBREW_FORCE_BREWED_GIT
Because of this messing with the user's path:
https://github.com/Homebrew/brew/blob/
    efc02899c851c62c9ce0d15dea9a231575d7d774/bin/brew#L68
brew uses /usr/bin/git over brewed git, even when the former is
problematically old.
There may also be other reasons a user prefers to use brewed git.

There was already a HOMEBREW_FORCE_BREWED_CURL option and a
HOMEBREW_SYSTEM_CURL_TOO_OLD check to set it. This mostly copies those
to implement HOMEBREW_FORCE_BREWED_GIT & HOMEBREW_SYSTEM_GIT_TOO_OLD.

See also: https://github.com/Linuxbrew/brew/issues/736
2018-06-25 23:36:12 -07:00
Mike McQuaid
34ae75d511 brew.sh: enable linkage cache for developers.
This seems stable on CI so I think we can expose it to more people.
2018-06-11 20:10:40 +01:00
Markus Reiter
c53a52daee Move --version logic into cmd/--version.rb. 2018-05-21 05:35:44 +02:00
Buck Evan
c1403ba933 /bin/cat -> cat
this allows odd linux installations (Android) to function
2018-03-17 17:05:39 -07:00
Mike McQuaid
9446eb661d brew.sh: HOMEBREW_DEVELOPERs can enable Ruby warnings.
It provides some useful helpers for when we're doing stupid things but
it's not something we want around by default.
2018-02-27 11:53:31 +00:00
Mike McQuaid
72f4d05418 Handle a too old system Git on OS X 10.8 and below
Needed for GitHub since:
https://github.com/blog/2507-weak-cryptographic-standards-removed
2018-02-26 16:08:10 +00:00
Mike McQuaid
84be0f82d4 brew.sh: use system curl on Linux where possible.
Result of discussion in #3809.
2018-02-20 09:12:47 +00:00