265 Commits

Author SHA1 Message Date
Mike McQuaid
9b682da37b
Use Homebrew/linuxbrew-core
This would allow the Linuxbrew core tap to live in the Homebrew
organisation.
2019-02-25 14:21:13 +00:00
Mike McQuaid
e7ce5dddb7
update: recommend 'brew untap` if tap doesn't exist.
We removed a few old, deprecated repos recently and people with them
still tapped who get confused at the `brew update` error message.
2019-02-16 19:57:56 +00:00
Mike McQuaid
172326a0cf
update: improve --help formatting. 2019-01-30 21:38:46 +00:00
Mike McQuaid
b2614ddcb6
update: make git rebase be quiet.
`--quiet` doesn't seem to be working as expected.
2019-01-12 11:55:06 +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
9aee39825d
update: also update master when updating stable branch. 2018-11-25 20:16:13 +00:00
EricFromCanada
e20ccfdb53 update: change repo remotes to HTTPS if possible
Older systems will install Homebrew via git://, but can switch to https:// if a newer curl is installed.
2018-11-14 16:44:35 -05: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
Shaun Jackman
fdcdf7cb5c CoreTap.default_remote: Use Linuxbrew/core [Linux] 2018-10-02 15:44:30 -07:00
Chongyu Zhu
cc0f17eb7b
cmd/update: make curl respect HOMEBREW_CURLRC 2018-09-14 18:50:21 +08:00
Mike McQuaid
dc7b73171c
cmd/update: follow GitHub API redirects.
Fixes #4867
2018-09-09 17:55:09 +01:00
Markus Reiter
bdc2458c15 Always fetch at least the latest tag. 2018-08-11 00:46:29 +02:00
Jack Haden-Enneking
e63feb79f9
Simplify check before git install
No need to check for both variables, because they're always set together.
Also, this harmonizes with the CURL equivalent just above.
2018-06-26 11:14:32 -07: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
Eli Young
8734848829 Support enabling auto-updates for non-GitHub taps 2018-04-24 11:10:48 -07:00
Mike McQuaid
70a9a67411 Don't use Linuxbrew/homebrew-core (yet, at least).
This can't be tapped on vanilla Homebrew/brew because things like e.g.
`GlibcRequirement` are missing. We will put this back when the Linuxbrew
to Homebrew migration is complete.
2018-03-16 19:30:18 +00:00
Mike McQuaid
430bb7c3a0 update: tweak git too old check.
Avoid trying to install and warning if system Git is too old but Git
is already installed.
2018-02-27 10:41:16 +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
ilovezfs
17f80a44e6
Revert "Use Homebrew's gitconfig for various commands" 2018-01-15 07:30:56 +00:00
Mike McQuaid
228cbd81c9 Use Homebrew's gitconfig for various commands
Git is a transport and storage mechanism for us so we don't want to
allow arbitrary customisation of this due to user issues e.g. #3664
and #3561.

Fixes #3664.
2018-01-11 20:40:59 +00:00
Mike McQuaid
6b9ca5dbf5 Remove some unset/checked environment checks
These will be redundant once environment filtering is on by default
in #3529.
2017-12-08 16:33:33 +00:00
Mike McQuaid
a19d0708a4 Allow optionally using Homebrew's curl
If `HOMEBREW_FORCE_BREWED_CURL` is set then allow it to be used instead
of the system `curl`.
2017-11-26 18:17:26 +00:00
Mike McQuaid
bcca2a7c6b brew: handle Ruby 2.3 more gracefully.
- `brew.rb` needed updated to fail unless on Ruby 2.3
- `brew update` should unset `HOMEBREW_RUBY_PATH` to ensure that this
  doesn't "stick" on a Ruby 2.0 version after a portable Ruby has been
  installed.
2017-09-29 19:53:50 +01:00
Mike McQuaid
ffdda0eb9f Tweaks for older Mac OS X versions.
- `brew update` should try to install `curl` before `git` on older
  versions of Mac OS X where it is needed for accessing modern SSL
  certificates.
- We don't need an HTTP mirror for `git` because `curl` will already be
  installed before it is downloaded.
- Don't recommend GCC on Mac OS X versions where it can't be built with
  the default system compiler.
- Start using the Homebrew `curl` on Mac OS X versions where it is
  needed as soon as it is installed.
2017-09-16 12:41:08 +01:00
Tim Marinin
156e19c6dc Display "Use brew upgrade foo instead" when calling update with args
So the user could just copy-paste the command.
2017-07-10 12:30:58 +03:00
Mike McQuaid
228239af31 Allow forcing Homebrew GitHub organisation.
On Linux this defaults to Linuxbrew but in some cases (i.e. a Linux
machine performing uploads for Homebrew) we want to allow this to be
overridden back to the defaults.

Relies on a change incoming to `brew test-bot` to set this there.
2017-04-25 09:13:36 +01:00
Mike McQuaid
566d3cb58b Document all short flags. 2017-04-02 10:14:58 +01:00
Mike McQuaid
282622e449 update: stop autoupdate skipping no formula taps.
This will be slightly slower if you have a bunch of non-formula (i.e.
command or cask) taps but it avoids the confusion of having Homebrew
saying it's updated when it only did so selectively.

Fixes #1946.
2017-03-12 09:13:27 +00:00
Mike McQuaid
276d8805ca update: note migrations may be performed.
As requested in https://github.com/Homebrew/homebrew-core/issues/9316.
2017-01-29 17:30:44 +00:00
Baptiste Fontaine
bff8e8440e update.sh: Use full path to pkill
Fixes #1600.
2016-12-01 20:59:42 +01:00
Mike McQuaid
d4311fd49f update.sh: use sort instead of git tag --sort.
Older versions of Git don't have this flag and we don't want to block
updates for them when there's a (relatively) simple workaround.
2016-09-29 09:16:15 +01:00
Mike McQuaid
2c50f762ce update.sh: hide GITHUB_HEADERS missing output.
Will only happen once but could be confusing anyway.
2016-09-27 13:55:08 +01:00
Mike McQuaid
f6ec63cd8b update.sh: don't restore branch to stable.
Only run for Homebrew developers so assume they don’t want to switch
back to an old stable branch.

Fixes #1141.
2016-09-26 08:22:56 +01:00
Mike McQuaid
1ff2d06cf0 update.sh: use HOMEBREW_UPDATE_TO_TAG.
This makes the code easier to follow rather than having to know
HOMEBREW_NO_UPDATE_CLEANUP implies not updating to a tag.
2016-09-25 21:53:28 +01:00
Mike McQuaid
87cf4f7f7a update.sh: use GitHub tags API.
Otherwise if we've committed to `master` and someone `brew update`s
before we cut the tag then they won't be updated to the latest version.
2016-09-24 20:43:14 +01:00
Mike McQuaid
2f82837b77 Merge pull request #1121 from MikeMcQuaid/update-stable-branch
update.sh: always use stable branch for tags.
2016-09-24 18:59:10 +01:00
Mike McQuaid
22299cffab update.sh: always use stable branch for tags.
This avoids creating a new branch that’ll never be deleted for each tag
and differentiates between the `master` and `stable` branches.
2016-09-24 17:25:15 +01:00
Zhiming Wang
07866f0b54
update.sh: do not restore stable (tag) branch
Restoring stable branch post-update could lead to unsuspecting users
with homebrew.devcmdrun being stuck forever on an old tag.

Fixes #1111.
2016-09-24 05:49:04 -04:00
Mike McQuaid
b0dfd2d435 update.sh: only update to semver tags.
Otherwise random e.g. `pr-123` tags may cause `brew update` to update
to the wrong version.
2016-09-23 11:26:24 +01:00
Mike McQuaid
b33df4d0fa update.sh: don't print "checkout branch" message.
It’ll only get printed for people getting updated to tags now and these
are people who haven’t run a `dev-cmd` so we want to air on the side of
telling them less stuff that will confuse them and assume people who
have manually made another `git` branch will know how to get back to it.
2016-09-22 09:05:07 +01:00
Mike McQuaid
f9bd121e38 update.sh: tweak tag handling.
- Don't let the `UPSTREAM_TAG` variable bleed into future repository
  checks.
- Even if the tag branch is an ancestor of the tag ensure that it's
  forced back to the tag anyway.
2016-09-21 14:32:48 +01:00
Mike McQuaid
e8ebcb834b update.sh: allow forcing tag update.
To test the tag update functionality allow setting
`HOMEBREW_UPDATE_TO_TAG`.
2016-09-21 09:03:52 +01:00
Mike McQuaid
b2c7d6d83d update.sh: update to latest Homebrew/brew tag.
Rather than following every change on `master` let’s have non-developer
users (i.e. those who have never run a `dev-cmd` or set
`HOMEBREW_DEVELOPER`) update between tags.

This provides a fairly natural beta (the `master` branch`) and stable
(the tags) approach without restricting us to any particular way of
managing our tags.
2016-09-21 09:03:51 +01:00
Mike McQuaid
9623272283 update.sh: force a full update if we have no tags. 2016-09-20 17:16:47 +01:00
Mike McQuaid
d62512095f update.sh: always fetch tags.
We use these for updating people who just follow tags.
2016-09-20 17:16:47 +01:00
Mike McQuaid
3f9cce0a03 Use new "macOS" naming where appropriate.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
2016-09-18 19:57:19 +01:00
Mike McQuaid
d70841db2b update.sh: turn origin/branch into a variable.
Rather than repeating origin multiple times.
2016-09-18 13:45:32 +01:00
Mike McQuaid
8aa18510c4 Always run LinkedKegs migration (if needed).
Ensure that `brew update` always runs the LinkedKegs migration if needed
as it may not have been run by `brew update` if it was using `--preinstall` or
a `git pull` etc.

Also, if the old paths still exist: just use them instead.

Finally, always try to unlink/unpin before link/pin.

Fixes https://github.com/Homebrew/homebrew-core/issues/4918.
2016-09-17 13:25:32 +01:00
Mike McQuaid
b5a6b4e8e1 Merge pull request #896 from MikeMcQuaid/no-chown-usr-local
Don't require/recommend ownership of /usr/local.
2016-09-09 09:29:46 +01:00