3989 Commits

Author SHA1 Message Date
Martin Afanasjew
ade39af247 Revert "test-bot: clean up on Jenkins before building PR"
This reverts commit 51e4e6490bda0d981afd1787a6392ab588b0601c. This did
not work as intended, as the `git` command is executed in the context of
the tap the current job operates on, never for Homebrew/homebrew itself.
2016-04-03 12:15:47 +08:00
Martin Afanasjew
75961721ee test-bot: clean up on Jenkins before building PR
Wipe everything from the Homebrew prefix except for the `Library/Taps`
directory to avoid having to refetch `homebrew/core` every time.
2016-04-03 12:15:47 +08:00
Xu Cheng
bdd26d0446 test-bot: ensure tap is full clone 2016-04-03 00:34:09 +08:00
Xu Cheng
4366ea1889 test-bot: fix CI upload for core tap 2016-04-03 00:10:41 +08:00
Xu Cheng
c8fed576cb pull: auto fix legacy closes message 2016-04-03 00:10:41 +08:00
Xu Cheng
591ef25442 pull: fallback to old BrewTestBot git repo when necessary 2016-04-03 00:01:38 +08:00
Xu Cheng
deed8e566c test-bot: handle legacy formulae PR from Homebrew/homebrew
Closes Homebrew/homebrew#50635.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-03 00:01:38 +08:00
Xu Cheng
fa9a9ff5be tap-(un)pin/untap: better error message
Closes Homebrew/homebrew#49904.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-02 21:51:36 +08:00
Xu Cheng
360cd3cb56 pull: add --legacy flag
It will pull legacy formula PR from Homebrew/homebrew
TODO: remove it when it's not longer necessary
2016-04-02 21:51:36 +08:00
Xu Cheng
5560f5550d git: check homebrew/core existence before installing brewed git 2016-04-02 21:51:36 +08:00
Xu Cheng
2bb30fc5f0 --version/config: show core tap information 2016-04-02 21:51:36 +08:00
Xu Cheng
5bb8e8985d audit/test-bot/pull: fix for core/formula separation
All formulae are in taps now.
2016-04-02 21:51:36 +08:00
Xu Cheng
13141de0fd update-report: update for core/formula separation
Update the report logic, since now all formulae are in the taps.
2016-04-02 21:51:36 +08:00
Xu Cheng
56cb3325a6 remove migrate_taps
We don't need to migrate the tapped formulae from symlink-based to
directory-based structure any more.

Instead, we add core tap install check for `brew update-report` which
will be invoked by `brew update`.
2016-04-02 21:51:36 +08:00
Xu Cheng
a5cfc011e0 various: Homebrew/core is the core tap
Also make `Homebrew/homebrew` as an alias of this tap to keep
backward compatibility.
2016-04-02 21:51:36 +08:00
Mike McQuaid
6135da800e utils, gist-logs: improve/fix credential handling.
The API used (`Net::HTTP::Post`) does not handle basic authentication
credentials in the same way as `open` so fix both cases so they work.

Also, do some general usability tweaks to point out to people what could
be wrong with their tokens or credentials to help them debug.

Closes Homebrew/homebrew#50410.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-28 18:22:47 +08:00
Xu Cheng
b8a4677de0 --repository: support to show tap path
This can become handy when we separate core code and formulae. For
example, we could use `cd $(brew --repo homebrew/core)` to go to core
tap path.

Closes Homebrew/homebrew#50346.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-24 14:52:13 +08:00
Xu Cheng
99155c3b5f update: use git from ENV/scm/git
The idea is to let `scm/git` to handle all of git location resolution
throughout Homebrew codebase.

Closes Homebrew/homebrew#50116.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-21 19:07:38 +08:00
Xu Cheng
93cbab0021 Revert "brew fetch: only include sha256 in output"
This reverts commit 0b38f9b286bc61e2b2d2232f80ea8ebc5909fb07.
2016-03-20 14:55:58 +08:00
Sam McTaggart
148da47571 Improve error message for invalid regex to search
Fixes https://github.com/Homebrew/homebrew/issues/50131

This commit removes the error backtrace and improves the error message
if a bad regexp is passed to `brew search`.

Closes Homebrew/homebrew#50173.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-03-19 19:14:50 +08:00
Xu Cheng
161a1e286e Revert "test-bot: better xml character filtering"
This reverts commit 7032591bd44a8f50aaa55574ac97cd5cb7261460 and
commit 946c6deb4b5168ad2ec15e62aa6e81181e9e246c.
2016-03-14 20:41:33 +08:00
Xu Cheng
60055ba890 test-bot: fix encoding caused by UTF-8 regex 2016-03-14 20:33:35 +08:00
Xu Cheng
a6b918d6c5 test-bot: better xml character filtering
Ref:
 - http://www.w3.org/TR/xml/#charsets
 - http://stackoverflow.com/a/14323524

Closes Homebrew/homebrew#50092.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-14 19:58:15 +08:00
Andrew Janke
a74e872409 brew fetch: only include sha256 in output
Closes Homebrew/homebrew#50067.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-03-14 19:39:15 +08:00
Baptiste Fontaine
236a18debe audit: fix crash when HOMEBREW_NO_GITHUB_API is set
Running brew audit --strict --online on a formula with a GitHub
homepage/url would crash if HOMEBREW_NO_GITHUB_API is set because
GitHub.repository returns `nil` and the audit code assumes it always
returns a hash.

Closes Homebrew/homebrew#50054.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-03-14 19:39:15 +08:00
Andrew Janke
23ee1ee499 brew pull: fix encoding of brew info --json output
Fixes Homebrew/homebrew#49757
Closes Homebrew/homebrew#49775

Closes Homebrew/homebrew#49947.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-03-13 14:32:05 +08:00
Andrew Janke
f63b4359d7 brew pull: enable blocking bintray publish by setting content-type
Looks like the bintray publish_wait_for_secs was being ignored because the
content type wasn't being set, so it defaulted to x-www-form-urlencoded
instead of application/json.

Changes the  timeout to 0 to preserve current non-blocking behavior, which
we want in case multiple formulae are being updated.

Closes Homebrew/homebrew#49951.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-03-11 13:32:54 +08:00
Mike McQuaid
2c3a7e8c75 Fix brew update user agent.
This needs to be `Homebrew $HOMEBREW_VERSION` so we can be adequately
filtered.

Closes Homebrew/homebrew#49961.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-11 13:32:54 +08:00
Xu Cheng
0f6def90b7 update: shallow fetch for git_init_if_necessary
Users shouldn't need to fetch all of git history.

Closes Homebrew/homebrew#49903.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-09 19:47:26 +08:00
Xu Cheng
865b788e96 Revert "update: checkout branch unconditionally"
This reverts commit 0525c9eeea27eff1a6de05e7a01ec268ae07437b.
Which breaks `brew update --rebase`.
2016-03-09 17:38:46 +08:00
Mike McQuaid
041c8502c5 Set HOMEBREW_API_TOKEN from Git when available.
As requested in Homebrew/homebrew#46578. Falls back to existing functionality.

Closes Homebrew/homebrew#46578.

Closes Homebrew/homebrew#49846.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-08 20:52:11 +08:00
Xu Cheng
3a4f2c1aea update: checkout branch unconditionally 2016-03-08 20:36:19 +08:00
Xu Cheng
cad2a5620f update: passing --force to git fetch
Per document:
> -f, --force
>    When git fetch is used with <rbranch>:<lbranch> refspec, it refuses
>    to update the local branch <lbranch> unless the remote branch
>    <rbranch> it fetches is a descendant of <lbranch>. This option
>    overrides that check.
2016-03-08 20:36:19 +08:00
Xu Cheng
6f9f3faef3 test-bot: fix wrong tap argument check 2016-03-07 20:00:35 +08:00
Xu Cheng
5b63890198 test-bot: check if current repo is a tap
If it's not a tap, we test formula on CoreTap. This can happen
if we run test on a fork, e.g. Linuxbrew or future Homebrew/brew.

Closes Homebrew/homebrew#49844.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-07 19:43:46 +08:00
Xu Cheng
1e487edd21 tap various commands: use tap name method.
Instead of hard coded `Homebrew/homebrew`
2016-03-07 19:43:46 +08:00
Xu Cheng
28f3dae8cd rename CoreFormulaRepository to CoreTap
Core tap will be separated from core code in the near future.
It makes sense to rename it to CoreTap.
2016-03-07 19:43:46 +08:00
Tim D. Smith
b4edf23a36 test-bot: make bottle stats visible by default
Closes Homebrew/homebrew#49620.
2016-02-28 09:51:14 -08:00
Xu Cheng
eb6f970b90 tap: support --quieter flag
Closes Homebrew/homebrew#49551.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-26 18:42:36 +08:00
Xu Cheng
b52af53e71 various: use Tap abstraction
formula_rename and tap_migrations are now handled inside Tap.

Closes Homebrew/homebrew#49549.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-26 17:00:17 +08:00
Xu Cheng
2496bdf280 remove update-ruby
Closes Homebrew/homebrew#49523.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-25 23:05:39 +08:00
Xu Cheng
9a4987533a update-report: fix new_full_name in report 2016-02-25 17:27:50 +08:00
Xu Cheng
239c860863 update-report: refactoring
* Better variable/class name. `update-report` isn't response to actual
  update.
* Use abstraction offered by Reporter and ReproterHub class.
* Failure on one tap won't affect migration preformed by other taps.
* Simplify logic and prepare for core/formula separation.
2016-02-25 17:22:28 +08:00
Xu Cheng
95a6067702 update-report: refactoring ReporterHub
* Better variable/class name.
* Remove obsolete update_renamed, this is now handled inside each
  reporter.
* Remove obsolete formula file path to name computation, which is also
  handled by reporter.
* Hide low lever implementation detail to offer better abstraction.
  Use `add(reporter)` instead of `Hash#update` to add new report.
2016-02-25 17:22:28 +08:00
Xu Cheng
849e62c736 update-report: use tap inside Reporter
* Avoid tons of unnecessary file path manipulation. Use abstraction
offered by Tap class if possible.
* Handle formula rename/tap migration inside reporter in per tap basis.
* Avoid duplicated computation.
* Remove redundant/dead code.
2016-02-25 17:22:28 +08:00
Paul Phillips
6b6159a858 list: exclude .github from unbrewed
Recently added files polluting brew ls --unbrewed results.

Closes Homebrew/homebrew#49456.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-23 22:39:14 +01:00
Mike McQuaid
3505509bae update: better handle merge conflicts.
When there are merge conflicts we fail pretty hard. This is still
possible after this commit but at least we've given Git enough pointers
to make it less likely.

Closes Homebrew/homebrew#49299.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-22 09:00:35 +00:00
Xu Cheng
cfc5fed7ce update: fix fork bomb caused by brew update --help
Fixes Homebrew/homebrew#49334.

Closes Homebrew/homebrew#49343.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-19 17:28:37 +08:00
ilovezfs
8e6c3ab039 update: always checkout master.
This should help to prevent situations where a user accidentally ends up
"stranded" in a branch indefinitely.

Additionally, the stash is never popped automatically at the end of a
successful update, but the stash-pop message is printed if something is
stashed.

When an interrupt occurs, the original behavior is still in place
(switch back to the old branch and revision, and pop the stash), though
this could be changed as well.

This commit modifies the behavior of both `brew update` and
"update-bash.sh" in the manner described above.

The idea for this approach is from Mike McQuaid.

Issue Homebrew/homebrew#48812

Closes Homebrew/homebrew#48993.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-18 10:44:14 +00:00
Mike McQuaid
3ac1c7b653 update: use GitHub API to avoid unneeded fetches.
Check to see if `HEAD` is the same as what we have locally. If it is:
don't bother to `git fetch`.

Closes Homebrew/homebrew#47888.

Closes Homebrew/homebrew#49219.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-18 10:43:10 +00:00