Commit Graph
1878 Commits
Author SHA1 Message Date
Markus Reiter 6d21df2c8b Always choose longer version in correct format. 2020-12-07 23:03:47 +01:00
Markus Reiter bf46814ddd Skip casks before extracting. 2020-12-07 23:03:47 +01:00
Markus Reiter a3182a6386 Extract package into new temporary directory. 2020-12-07 23:03:47 +01:00
Markus Reiter ef1ea75c08 Add support for single-package casks. 2020-12-07 23:03:47 +01:00
Markus Reiter 2157a71a68 Never exit with failure. 2020-12-07 23:03:47 +01:00
Markus Reiter ffebf0da5f Update check_time even if time and file size didn't change. 2020-12-07 23:03:47 +01:00
Markus Reiter 0a54169fa6 Change limit to minutes. 2020-12-07 23:03:47 +01:00
Markus Reiter b57a448f2a Add bump-unversioned-casks command. 2020-12-07 23:03:47 +01:00
Michka Popoff d768b6649a bottle: add tests for json merging
- Extract the json reading from the json merging: it makes the code hard to understand.
This helps for the separation of concerns: the jsons are read in one method;
and merged in a second one
- Added a first test to check the merge function

No change in behaviour was done, this change is just there to increase code coverage
and to prepare for #9315
2020-12-07 19:58:49 +01:00
Mike McQuaid 532864b0ef dev-cmd/dispatch-build-bottle: remove testing code.
This was accidentally merged in https://github.com/Homebrew/brew/pull/9444.
2020-12-07 14:42:00 +00:00
Mike McQuaid 09cca671bd dev-cmd/dispatch-build-bottle: set ARM labels.
Set the label properly for ARM.

Tested with inputs `11-arm` and `arm64_big_sur`.

Fixes https://github.com/Homebrew/brew/issues/9434
2020-12-07 13:20:01 +00:00
Jonathan Chang 8b206dfa33 git_extensions: move commit_message from utils/git 2020-12-06 14:33:23 +11:00
Jonathan Chang 92d3eda914 git_extensions: move origin_branch from utils/git 2020-12-06 14:33:23 +11:00
Jonathan Chang d802b3755a utils/git: remove redundant current_branch 2020-12-06 14:33:23 +11:00
Jonathan Chang 5bda84b594 dev-cmd/pr-pull: use git_extensions 2020-12-06 14:33:23 +11:00
Rylan PolsterandGitHub 77b4275f81 Merge pull request #9326 from Rylan12/migrate-style-exceptions
Migrate style exceptions to homebrew/core
2020-12-01 12:19:45 -05:00
Markus Reiter 6f09768549 Add missing require in dev-cmd/irb. 2020-12-01 12:05:21 +01:00
Rylan Polster c181c9995e style: add --reset-cache option 2020-11-30 18:18:50 -05:00
Markus Reiter f438fa98be Avoid reinstalling bundler in integration tests. 2020-11-30 20:52:27 +01:00
Markus Reiter 323cfbca41 Fix type error in dev-cmd/dispatch-build-bottle. 2020-11-29 22:59:10 +01:00
Markus Reiter 6fb5315deb Fix unconditionally true condition. 2020-11-29 22:37:24 +01:00
Markus Reiter 749199632b Add signatures for dev-cmd/unbottled. 2020-11-29 22:37:24 +01:00
Markus Reiter 6750448d95 Fix some auto-correctable type errors. 2020-11-29 21:23:54 +01:00
Issy LongandGitHub f142714448 Merge pull request #9312 from issyl0/unbottled-fail-nicely-if-HOMEBREW_NO_ANALYTICS
dev-cmd/unbottled: Fail nicely if `HOMEBREW_NO_ANALYTICS` is set
2020-11-27 18:03:34 +00:00
Markus ReiterandGitHub 79d6c059fc Merge pull request #9297 from reitermarkus/brew-typecheck
Refactor `brew typecheck` and upgrade `typed` sigils.
2020-11-27 00:01:47 +01:00
Michka PopoffandGitHub d42e8c7842 Merge pull request #9310 from iMichka/cellar
bottle merge: add support for linux cellar
2020-11-26 23:31:28 +01:00
Issy Long ca999a81f7 dev-cmd/unbottled: Fail nicely if analytics data can't be retrieved
- When testing `brew unbottled <formula>` this crashed because I, as a
  maintainer, have `HOMEBREW_NO_ANALYTICS` set on all my machines to
  avoid polluting the analytics with test installs.

```
❯ brew unbottled
==> Getting formulae...
==> Getting analytics data...
Error: undefined method `[]' for nil:NilClass
/usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:89:in `formulae_all_sort_installs_from_args'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:49:in `unbottled'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
```
2020-11-26 21:21:48 +00:00
Michka Popoff 95bf529ad2 bottle merge: add support for linux cellar
The first attempt to build and pull a formula (hello) for linux in homebrew-core
resulted in a wrong cellar line being added to the formula's bottle block.

How to test/debug this, using the 4 bottles that where built for hello:
brew bottle --merge --debug hello--2.10_1.mojave.bottle.json hello--2.10_1.x86_64_linux.bottle.json hello--2.10_1.big_sur.bottle.json hello--2.10_1.catalina.bottle.json

This command would add create the following bottle block:

  bottle do
    cellar "/home/linuxbrew/.linuxbrew/Cellar"
    sha256 "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" => :big_sur
    sha256 "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" => :catalina
    sha256 "22948764d8f8d7be4870ff92dae64d986eb63a9150b219c20fff87d1a6aa93d6" => :mojave
    sha256 "702dc7f78444d2f4f1c19324be654bcbb8b99dd0e9ce26c3e2fbc3b6464a189f" => :x86_64_linux
  end

After the change in this PR, the result is the following:

  bottle do
    sha256 "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" => :big_sur
    sha256 "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" => :catalina
    sha256 "22948764d8f8d7be4870ff92dae64d986eb63a9150b219c20fff87d1a6aa93d6" => :mojave
    sha256 "702dc7f78444d2f4f1c19324be654bcbb8b99dd0e9ce26c3e2fbc3b6464a189f" => :x86_64_linux
  end

The brew bottle --merge code will pick the most common cellar line between the 4 bottles, by order of priority:
- non-relocatable (fixed cellar path)
- cellar :any
- cellar :any_skip_relocation

In the case of the hello bottle, the 3 mac bottles are "cellar :any_skip_relocation", and the linux bottle
is non-relocatable. So the linux bottle wins and the code correctly determines that the 4 bottles should
be non-relocatable.

In that case, the /home/linuxbrew/.linuxbrew/Cellar path is defined as cellar, and by convention
we do not write that out to the formula file, hence the cellar path check that needs to be modified
in this PR.

This PR also fixes the same situation for mac ARM cellar paths
2020-11-26 15:11:55 +01:00
Mike McQuaid 135b5a3679 dev-cmd/unbottled: add new command.
Add a new command to list formulae that aren't bottled for a given OS.
2020-11-26 08:22:06 +00:00
Michka PopoffandGitHub 9c3515ce73 Merge pull request #9284 from iMichka/first
pr-pull: fix empty workflow check
2020-11-25 17:49:21 +01:00
Markus Reiter 5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Markus Reiter 0032cfca5b Refactor brew typecheck. 2020-11-25 17:04:19 +01:00
Michka Popoff 76e52ebe62 pr-pull: fix empty workflow check
workflow_run is an array, which first element is the json
returned by the github API. We need to check that first element
if we want to know if the workflow exists.
2020-11-25 16:10:35 +01:00
Mike McQuaid f364f0c841 Merge remote-tracking branch 'origin/master' into deprecate-cask-commands 2020-11-25 09:39:00 +00:00
Mike McQuaid b484f70572 Remove cask from man brew. 2020-11-25 09:37:21 +00:00
Mike McQuaidandGitHub db33c9a2a0 Merge pull request #9209 from MikeMcQuaid/deprecations
Deprecations for Homebrew 2.6.0
2020-11-25 08:49:52 +00:00
Rylan Polster 20de58b5ae bump-formula-pr: use new update_python_resources! signature 2020-11-24 15:40:15 -05:00
Rylan Polster 51a1b7c9e1 move pypi list to tap formula_lists directory 2020-11-24 15:40:15 -05:00
Rylan Polster 8e670995f8 migrate automatic python resource list to Homebrew/core 2020-11-24 15:40:15 -05:00
Mike McQuaid d496f5c121 Deprecations for Homebrew 2.6.0
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.

Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
Michka Popoff 1fc3d22ab4 pr-pull: allow to pull from multiple workflows
and allow to skip missing workflows

Can be used like this:
brew pr-pull --workflows=tests.yml,wheezy_tests.yml --ignore-missing-artifacts=wheezy_tests.yml PRNUMBER
2020-11-24 15:46:44 +01:00
Markus ReiterandGitHub 7085c37098 Merge pull request #9222 from reitermarkus/brew-cask-create
Allow creating casks with `brew create --cask`.
2020-11-24 11:34:38 +01:00
EricFromCanada 16e22bb5e8 sh: skip reading user-level initialization files 2020-11-22 21:38:22 -05:00
Issy Long c784d9b955 dev-cmd/audit: Fix "undefined method audit_exceptions"
- When running `brew audit` on formulae that aren't in a Homebrew tap
  location (ie, in a directory outside of
  `/usr/local/Homebrew/Library/Taps`), `brew audit` falls over because
  it can't determine which tap a formula is in.
2020-11-21 20:24:34 +00:00
Markus Reiter 3c2ec1c60f Deprecate remaining cask commands. 2020-11-21 19:56:12 +01:00
Markus Reiter 560f8e2b03 Fix checksum replacement in bump-cask-pr. 2020-11-21 19:08:06 +01:00
Markus Reiter b6492094d0 Allow creating casks with brew create --cask. 2020-11-21 18:52:26 +01:00
Markus Reiter 49b95da14b Update sorbet and sorbet-runtime together. 2020-11-21 04:14:41 +01:00
Markus Reiter 45950bb8ad Support casks in brew edit. 2020-11-20 00:43:15 +01:00
Markus Reiter bc24128263 Support casks in brew cat. 2020-11-19 16:01:10 +01:00