Commit Graph
88 Commits
Author SHA1 Message Date
Baptiste Fontaine af94c4fc50 pull: skip non-ruby files when collecting formulae names
Closes #377.

Signed-off-by: Baptiste Fontaine <b@ptistefontaine.fr>
2016-06-19 23:35:16 +02:00
Mike McQuaid 822b05c9c1 cmd/pull: fix HTTP header usage. 2016-06-03 15:32:11 +01:00
Mike McQuaidandGitHub 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
Mike McQuaid 60cb841ddb pull: remove legacy retry block. 2016-05-28 20:12:00 +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 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
Andrew Janke 2044294a86 brew pull: fix bogus line that was raising warning 2016-05-12 09:09:31 -04: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
Mike McQuaid 5f06312916 cmd/pull: bump retry count. 2016-05-10 09:06:59 +01:00
Mike McQuaid 59de2c7ecf pull: fix bottle_tag references. 2016-05-08 17:18:19 +01:00
Mike McQuaid 931e292bf1 Make bottle code cross-platform. 2016-05-08 16:51:22 +01:00
Martin Afanasjew f653cb8340 pull: fix references to renamed variable
Fix bug originating in #132.
2016-05-04 02:46:21 +02:00
Andrew Janke bf23ba1d1e pull: fix polling code for Ruby 1.8.7 Net::HTTP (#191) 2016-05-03 10:30:01 -04:00
Andrew Janke 798c342f4e brew pull: cross-platform bottle verification, concise output (#132)
Do the bottle check using any platform's bottle, so `brew pull` works
on bottled formulae which don't include a bottle for the current system.

Make output more concise and informative
 * Remove expected download error messages when waiting for Bintray publishing
 * Replace patch download progress bars with patch file name
 * Silence git output about switching to and from bottle-pulling branch
 * Include formula name and patch type in some progress messages
2016-05-03 08:22:28 -04:00
Martin Afanasjew 02289fce42 Update Homebrew/homebrew references in code
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
2016-05-02 21:19:09 +02:00
Martin Afanasjew 8600b9edf1 Update Homebrew/homebrew references in comments
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
2016-05-02 21:19:09 +02:00
Xu Cheng e158b5e4b1 pull: fix --legacy for legacy-homebrew repo 2016-04-03 21:22:39 +08:00
Xu Cheng df5bd0b796 pull: fix --legacy when pulling bottle from new repo 2016-04-03 12:15:47 +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 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 5bb8e8985d audit/test-bot/pull: fix for core/formula separation
All formulae are in taps now.
2016-04-02 21:51:36 +08:00
Andrew JankeandXu Cheng 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 JankeandXu Cheng 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
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
Xu Cheng 4e51c0b8ea add Tap#formula_file?
Return true if given path would present a Formula file in this Tap.
Accepts both absolute path and relative path (relative to this Tap's path)

It offer an abstraction such that caller would not need to worry about
low level file system in the tap.

It will be used in `brew pull` and `brew update`.

Closes Homebrew/homebrew#49191.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-16 14:23:39 +08:00
Andrew Janke 0322d9bd82 pull --bump: add auto-detection of devel bumps
Closes Homebrew/homebrew#48472.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-02-12 07:33:51 -05:00
Martin Afanasjew 5b89c33cac pull: fix ambiguity issues for tap migrations
`Formula[name]` gets called with an unqualified name and thus will throw
`TapFormulaAmbiguityError` exceptions (silently ignored) if both the old
and the new tap are present and changes for the new tap are pulled
before the migrated formulae are removed from the old tap.

The result is an empty or incomplete `changed_formulae`, causing issues
with pulling the corresponding bottles and possibly other problems, too.
2016-02-03 00:36:48 +01:00
Baptiste Fontaine 169b8fc039 Revert "minor perf improvements"
This reverts commit 16a2a8274a7808e63a6c78475e12a7c0ef5812ef.
2015-12-26 23:00:38 +01:00
Baptiste Fontaine 48681c3f3a minor perf improvements
Closes Homebrew/homebrew#47224.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-26 22:58:26 +01:00
Xu Cheng 0f84b976ba move CoreFormulaRepository into separate file
For users whose local brew is at around 2015-06-11 to 2015-08-06,
running `brew update` will emit following error:

  Error: uninitialized constant Formulary::CoreFormulaRepository

This is caused by the same bug described in Homebrew/homebrew#42553.

This commit workarounds this issue and restores `brew update` compatibility
for users mentioned above.

Also cleanup legacy `require "cmd/tap"`.
2015-12-19 22:05:30 +08:00
Xu Cheng 3cc101ec5e pull: use tap object
Fix the regression introduced by Homebrew/homebrew#46735.
2015-12-13 01:29:52 +08:00
Dominyk Tiller 1a4068f0be pull: fix pulling desired bottles 2015-11-12 01:35:58 +00:00
Dominyk Tiller b381137cef pull: don't try to publish nonexistent bottles
```
Fast-forward
 Library/Formula/ant.rb     |  8 ++++----
 Library/Formula/nailgun.rb | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)
Deleted branch pull-bottle-45902 (was 1fdb73d).
==> Publishing on Bintray:
{"files":3}
==> Publishing on Bintray:
Error: Failure while executing
```

In that case, "jetty-runner" is bottle unneeded, but because I've passed the
pull bottle command for the other two formulae, it attempts to publish a bottle
that isn't there.
2015-11-12 00:19:38 +00:00
Mike McQuaid 2614d39087 pull: fix pulling new bottles. 2015-11-01 08:25:02 -08:00
Xu ChengandMike McQuaid ae329a802b pull: use bottle_defined?
Fixes Homebrew/homebrew#45575

Closes Homebrew/homebrew#45577.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-11-01 08:22:18 -08:00
Xu Cheng 593dff3dc1 pull: bottle_unneeded? is covered by bottle_disabled? 2015-11-01 17:51:10 +08:00
Mike McQuaid 18b2d0150e pull: handle unneeded and disabled bottles.
Closes Homebrew/homebrew#45563.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-31 23:45:11 -07:00
Mike McQuaid 49dde3c559 pull: increase Bintray fetch retries. 2015-09-14 08:09:26 +01:00
Mike McQuaid cfc6f737f3 pull: allow pulling all testing jobs. 2015-09-11 14:59:46 +01:00
Mike McQuaid 59bd08e992 pull: more formulae fetch outside of main loop.
Closes Homebrew/homebrew#43313.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-27 13:41:06 +01:00
Mike McQuaid 166e33c2ff pull: do fetch after everything else, sleep more.
Use an exponential back-off on the sleep and try the fetch more times.

Hopefully this will mean that we spent less time waiting for Bintray.

Closes Homebrew/homebrew#43240.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-25 16:43:37 +01:00
BrewTestBotandMike McQuaid 13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Dominyk Tiller a675aae553 pull: stop printing warning on test-bot
Closes Homebrew/homebrew#42097.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-07-24 19:22:01 +01:00
Mike McQuaid 913659efe4 pull: wait for Bintray publish, don't sleep.
Closes Homebrew/homebrew#41530.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-10 16:13:52 +01:00
Dominyk Tiller 2456c9a4c4 pull: sleep for longer 2015-07-07 23:26:04 +01:00
Mike McQuaid 33fa3bacf6 pull: support Jenkins "Homebrew Testing" jobs. 2015-07-03 10:59:53 +01:00
Xu Cheng f47a4dac75 pull: use Formula#full_name 2015-05-29 17:02:22 +08:00
Xu Cheng 68a654dd26 pull: warning if we are not in master
Closes Homebrew/homebrew#39708.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-05-13 18:32:37 +08:00