28 Commits

Author SHA1 Message Date
Markus Reiter
7cadff0a33 Use PATH where possible. 2017-09-29 22:18:24 +02: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
d7e2d5be36 update-test: tweak more edge cases.
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.
2017-05-29 15:13:08 +01:00
Mike McQuaid
224d2c21ca update-test: improve no tags found messaging.
Currently you just get `Could not find start commit!` which is not as
explicit as it could be.
2017-05-29 10:06:04 +01:00
Shaun Jackman
89f3b6d6a6 update-test: Use git fetch --tags --depth=1
Use git fetch --tags --depth=1 to fetch fewer commits.
2017-03-28 09:36:50 -07:00
Mike McQuaid
c3bf9bda58 update-test: improve error handling.
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.
2017-03-28 15:31:16 +01:00
EricFromCanada
aee23ccb03 Add more flags and descriptions to man pages. 2017-03-05 21:45:15 -05:00
EricFromCanada
afc539f86e Update brew's man page formatting and grammar
Also update command specifications to match descriptions.
2017-02-25 17:37:57 -05:00
Mike McQuaid
59933f5cd9 update-test: fix --to-tag failure on new tag.
Without this updating to a tag will always have the same start commit
and end commit as there's been no updates to `master` since the tag was
created.
2016-10-29 09:09:00 -04:00
Markus Reiter
cafe149780 Merge pull request #1145 from reitermarkus/module-function
Use `module_function` for `Homebrew` module.
2016-10-04 10:31:49 +02:00
Mike McQuaid
c6f5d24238 update-test: fix tag updating, skip core tap.
Fix updating the `stable` branch used for tagged updates and ensure
that the core tap isn’t retapped (the slowest part by far of this test).
2016-10-02 17:16:35 +01:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid
842ae5dfee update-test: add --to-tag option.
This option is used to test updating between tags.
2016-10-01 13:29:18 +01:00
Alyssa Ross
b81dcea043 update-test: more accurate variable names 2016-09-22 19:26:41 +01:00
Alyssa Ross
5ba04b0cc6 docs: more accurate update-test parameter name
`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`.
2016-09-22 19:26:24 +01:00
Mike McQuaid
1649545cf9 update-test: handle missing master branch.
Ensure it's always created.

Also, re-order `update-test` in `test-bot` (and `readall`) so they are
run before the test suites.
2016-09-16 17:17:50 +01:00
Mike McQuaid
86bfd36af2 Don't hide some (now) developer commands. 2016-09-08 20:46:37 +01:00
Mike McQuaid
ebdb879fe4 Add --help to all developer commands.
Also, flag those that we never want to be in a manpage.
2016-09-08 09:05:00 +01:00
Mike McQuaid
65164cb386 update-test: tweak master not updated check.
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.
2016-08-14 11:52:22 +01:00
Mike McQuaid
b9d5b11f32 update-test: check we end up at end commit.
This would have caught the bug fixed in 985c67.
2016-08-11 11:26:37 +01:00
Andrew Janke
acc9a7ca85 brew test, install, update-test: add --keep-tmp option
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>
2016-04-18 12:23:08 -04:00
Xu Cheng
a47ea61f0b update-test: fix git fork bomb 2016-04-02 21:51:36 +08:00
Xu Cheng
203000cee6 update-test: allow setting start commit
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
2015-12-19 22:05:30 +08:00
Xu Cheng
a25fc67813 update-test: use git clone --local instead of copy
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.

Closes Homebrew/homebrew#44005.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-18 14:24:54 +08:00
Xu Cheng
6792847fc1 fix update-test
Previously, `brew update-test` is run against master branch of local
repo. However, we test PR using a detached branch in `brew test-bot`.
The result is `brew update-test` will always be up-to-date in `test-bot`.

To fix it, we create two local copies of git repo, and set master branch
to start and end sha1 correspondingly. After that, `brew update` will be
run to simulate the change between start and end sha1.

Closes Homebrew/homebrew#43902.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-14 21:07:37 +08:00
Mike McQuaid
deca462d9e update_test: run update verbosely. 2015-09-14 08:00:50 +01:00
Xu Cheng
2c4eb4b503 update-test: better output 2015-09-13 13:08:41 +08:00
Xu Cheng
ce390b9bd9 add dev-cmd folder 2015-09-12 19:15:45 +08:00