- The `--local` option doesn't exist in early versions of git (~1.7),
but its behaviour is the default (saving in the current repo's .git
directory).
- As it's the default across versions, we don't need to specify it
everywhere.
- Reported in Linuxbrew/install issue 78.
- 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.
- `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.
Don't try to `fetch --depth=1` unless we've confirmed the repository is
already shallow. Otherwise this can discard history from a full clone.
Additionally, if the repository wasn't shallow but there's no tags found
assume that Git is too old and try a naive sort if on Linux where `sort`
is able to sort versions.
Fail if the start or end commit are missing and retry finding the
previous tag by fetching all tags if they are missing.
This should fix CI on the current Homebrew/brew `master` branch.
Closes#2404.
`sha1` isn't a very accurate description of what this value can be
because it can be any git commit reference. For example, `brew test-bot`
uses `brew update-test --commit=HEAD`.
Loosen this a bit; we don't necessarily expect the end commit is the one
we're looking for, just that it has changed from the start commit (i.e.
some sort of update has occurred).
Addresses some false negatives on `master` branch merges that weren't
present on the PR commits.
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.
Closes#66.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
To use origin/master as start commit
brew update-test
To use <sha1> as start commit
brew update-test --commit=<sha1>
To use commit at <date> as start commit
brew update-test --before=<date>
Also print start/end commit for debug purpose
The .git directory in BrewTestBot is huge(1GB) which results to poor
performance of `brew update-test`. Therefore, let's use `git clone
--local` here which will create hard symlink to boost performance.
ClosesHomebrew/homebrew#44005.
Signed-off-by: Xu Cheng <xucheng@me.com>