3989 Commits

Author SHA1 Message Date
Mike McQuaid
822b05c9c1 cmd/pull: fix HTTP header usage. 2016-06-03 15:32:11 +01:00
Mike McQuaid
8a217dd420 update: tweak stash/checkout behavior. (#312)
Always pop stashed changes for Homebrew developers and only checkout
original branches for them (to avoid users who don't understand Git
ending up "stuck" on branches).
2016-06-03 14:12:36 +01:00
Mike McQuaid
8e0e1642ad Use curl for the GitHub API (#295)
* Move GitHub API module to utils/github.rb.

* Move curl method to utils/curl.rb.

* global: use long curl arguments and an array.

This makes the code more self-documenting.

* utils/curl: support reading curl's output.

* utils/github: use curl instead of open-uri.

It has far better proxy support.

* pull: set Homebrew user agent.

* gist-logs: remove trailing whitespace.

* gist-logs: use first instead of [0].

Easier to read.

* gist-logs: use curl-based GitHub.open method.
2016-06-03 13:05:18 +01:00
Martin Afanasjew
1c00fed119 audit: check Maven Central URLs, prefer redirector (#311)
Should help with being more consistent and makes sure to suggest the
HTTPS redirector even if equally valid HTTP URLs for specific hosts or
`central.maven.org` are used.
2016-06-02 09:36:27 +02:00
Mike McQuaid
4a8fcae3cc update-report: improve cache migration messaging. 2016-06-01 13:03:03 +01:00
Mike McQuaid
8108106cf9 update-report: recreate migration_attempted_file.
If the deletion of `HOMEBREW_CACHE` fails then the
`.migration_attempted` file will have still been deleted so ensure it is
recreated.
2016-06-01 12:47:56 +01:00
Mike McQuaid
52ee7bf9e3 update-report: fix Mavericks check. 2016-06-01 09:49:50 +01:00
Mike McQuaid
a9abbab917 Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.

* config: move default HOMEBREW_CACHE to ~/Library.

* brew.1: document new default Homebrew cache.

* update-report: migrate legacy Homebrew cache.
2016-06-01 08:46:33 +01:00
Martin Afanasjew
8b97a00036 style: use RuboCop 0.40 2016-06-01 09:34:58 +02:00
Dominyk Tiller
0a7fcf2979
audit: appease rubocop
Closes #302.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-05-31 13:33:09 +01:00
Dominyk Tiller
331fdba29d
audit: prefer https/s over ftp where known available
The FTP protocol is prone to getting firewalled to death in places, so where
we know we can avoid that by using either secure or more commonly accepted
protocols let's do so.

Examples of output:

```
* Stable: ftp://ftp.cpan.org/pub/CPAN/authors/id/N/NE/NEILB/Time-Duration-1.20.tar.gz should be `http://search.cpan.org/CPAN/authors/id/N/NE/NEILB/Time-Duration-1.20.tar.gz`
* Stable: Please use https:// for ftp://ftp.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.89.tar.bz2
```
2016-05-31 13:32:47 +01:00
Dominyk Tiller
92e35705f8
audit: update mirrorservice check
mirrorservice accepts `http://ftp.mirrorservice.org` as well, apparently.
2016-05-31 13:32:47 +01:00
Dominyk Tiller
eaae49608f
audit: check for insecure metacpan urls 2016-05-31 13:32:47 +01:00
Dominyk Tiller
ff0f394f2e
Revert "audit: tweak cpan secure urls"
This reverts commit 7bbcf9cacc18aabf78a21ec5cc5892d440631e08.
2016-05-31 13:32:47 +01:00
Dominyk Tiller
9b7604df69
Revert "audit: tweak cpan secure urls"
This reverts commit 146a16d66bc796f0c6a4c7e2b88f1b73fb0aaa4c.
2016-05-31 13:32:47 +01:00
Mike McQuaid
d3ce497607 tap: default to full clones for developers. (#297)
You need a non-shallow clone to push branches upstream so if you often
tap and untap taps (e.g. `homebrew/boneyard`) then you need to remember
to manually `fetch -unshallow`.
2016-05-30 17:01:36 +01:00
Mike McQuaid
d20c1ed146 test-bot: move to dev-cmd. (#298)
This is not a command designed for end-users.
2016-05-30 11:17:52 +01:00
Mike McQuaid
0551471536 tests: no --only minimum coverage requirement. (#299)
This will almost certainly fail every time so let's disable this error.
2016-05-30 10:49:03 +01:00
ilovezfs
6f37394e53 bintray "package" should be name not full_name
Based on how it's used to construct URLs, the bintray "package" should
be the formula name not the formula full_name. For core formulae, there
is no difference, but that's not the case in other taps.

See https://github.com/Homebrew/homebrew-gui/pull/10

Closes #301.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-05-30 02:26:31 -07:00
Mike McQuaid
01b6787aa8 audit: make system check stricter with quotes.
As mentioned in:
https://github.com/Homebrew/homebrew-core/pull/1396#discussion_r64774080
2016-05-29 22:52:26 +01:00
Tomasz Pajor
146a16d66b audit: tweak cpan secure urls 2016-05-29 11:07:19 +02:00
Tomasz Pajor
7bbcf9cacc audit: tweak cpan secure urls 2016-05-29 11:03:50 +02:00
Mike McQuaid
adc293637f test-bot: don't brew tests for formula PRs. (#294)
This adds >1m to every build on every node and it can't actually be
affected/fixed by formula PRs.
2016-05-28 21:42:30 +01:00
Mike McQuaid
60cb841ddb pull: remove legacy retry block. 2016-05-28 20:12:00 +01:00
Mike McQuaid
7829af7508 bottle/test-bot: deep merge bottle JSON hashes. 2016-05-28 20:11:07 +01:00
Mike McQuaid
28d99940de pull: remove legacy-homebrew support. (#293)
There's no more pull requests left to pull on this repository.
2016-05-28 19:35:05 +01:00
Mike McQuaid
2f1be1f36f test-bot: only test --no-compat for Homebrew/brew. (#286)
This job takes almost a minute and it's not useful for all core taps
to run this.
2016-05-28 18:49:08 +01:00
Mike McQuaid
f946693b56 test-bot: remove support for legacy Homebrew repo. (#287)
We're not really getting any more PRs here and this code makes this file
harder to follow and refactor.
2016-05-28 18:48:51 +01:00
Mike McQuaid
9edb1a7a87 bottle: JSON-related tweaks/fixes. 2016-05-28 16:46:34 +01:00
Mike McQuaid
53b280c592 test-bot: fix tag reference. 2016-05-28 16:10:06 +01:00
Mike McQuaid
6ba466f5d8 Use JSON files for bottle upload data. (#166)
This means that we do not need to read formulae or evaluate Ruby at
upload time.
2016-05-28 15:54:05 +01:00
Martin Afanasjew
1c581a232c search: add alias -S back to zero-argument help
Amends 132ada2b0ebb3751c0f8f42ca83bb257b55a50fd until we properly figure
out a way of documenting built-in aliases (or not doing that) across all
commands that currently have aliases. See #270 for full discussion.
2016-05-26 17:52:58 +02:00
Joe Gallo
132ada2b0e Clarify brew search usage. (#270)
* Include --desc in brew search help text.
* Update brew search --desc text in README.
* Remove mention of alias in brew search help text to avoid any
  confusion.
2016-05-26 16:45:25 +02:00
Dominyk Tiller
56375a7b44 audit: minor spacing nit
Closes #248.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-05-26 11:05:10 +01:00
Dominyk Tiller
2c6fa07e6d audit: tweak devel/head tap check
For some reason the existing check seems to have started failing between
March and today. I haven't managed to narrow down why yet but the biggest
change between then and now was the core separation so perhaps related to that.

Perhaps at some point we started considering purely short tap names,
i.e. homebrew/devel-only rather than full tap names, i.e. homebrew/homebrew-devel-only,
in the audit mechanism.

This fixes the current issue whilst retaining the spirit of the original commit:
86d04e94e9
2016-05-26 11:05:10 +01:00
Dominyk Tiller
a0d008af77 audit: enforce freedesktop secure urls 2016-05-20 10:54:29 +01:00
Mike McQuaid
e825f59754 audit: check for block inreplace with single sub. (#254)
There are unnecessarily verbose, have been documented to be avoided and
it’s good to nudge people towards the other style.
2016-05-19 20:38:46 +01:00
Mike McQuaid
b8e5ff431d audit: check more GitHub URLs. (#256)
GitHub’s code load and patch-diff URLs are the result of redirects and
make it harder to modify the URL to reach the original repository.
2016-05-19 07:56:11 +01:00
Zhiming Wang
bc1d5ae4d4 install: fix documentation of --keep-tmp option (#258)
Obvious copy/paste failure in acc9a7ca8554bc2413dee2d6d0f407b3a59c628c.
2016-05-19 08:43:42 +02:00
Xu Cheng
77836cfb3f fix shellcheck complaint 2016-05-13 14:41:29 +08:00
Xu Cheng
6eb2287221 move git shell function to brew.sh
git is also used in analytics.sh
2016-05-13 14:40:14 +08:00
Xu Cheng
92934db202 move brew shell function to brew.sh 2016-05-13 14:37:18 +08:00
Andrew Janke
2044294a86 brew pull: fix bogus line that was raising warning 2016-05-12 09:09:31 -04:00
Xu Cheng
1b6a200809 update: use lock
Closes #181.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-05-12 15:36:46 +08:00
Dominyk Tiller
745a1312dc pull: insert questionable syntax hack
I'm not completely sure this is "sane" logic but I'm leery of just reverting
Andrew's work this morning and making him rebuild that PR from scratch for one
syntax issue.

Sadly, because we run:
```
brew readall --aliases --syntax
```
On every CI job, and that flags this line previously as:
```
pull.rb:555: warning: possibly useless use of a variable in void context
```

Every single PR has "failed" since it was merged, and it's reached the point
of being a bit annoying, so let's try this.
2016-05-12 00:29:29 +01:00
Andrew Janke
b5a44161a4 cmd/pull: add retry to curl bottle download (#232)
Works around issue with GET and HEAD apparently acting differently, and
bottle downloads failing even after successful polling completion.
2016-05-11 09:52:35 -07:00
Andrew Janke
63ea9295cf brew audit: add --display-filename format option for easy grepping (#221) 2016-05-11 09:19:45 -07:00
Mike McQuaid
5f06312916 cmd/pull: bump retry count. 2016-05-10 09:06:59 +01:00
Mike McQuaid
5c1f463ac0 Move more methods to DevelopmentTools.
Closes #1028.
2016-05-10 08:19:48 +01:00
Martin Afanasjew
500f9eada8 update: fix hyphen counting (legacy tap renaming)
Fix regression introduced in fafe8f0f53bf91fc41f016b5c2af41ca712783f7.
Counting the number of hyphens in a string cannot be done in a single
expression, thus split this and introduce another local variable.

Fixes #227.
2016-05-09 21:00:26 +02:00