40 Commits

Author SHA1 Message Date
Mike McQuaid
b914411ac8
Delete Bintray code
Remove all code related to Bintray. It no longer works so there's no
point keeping it around.

Some of this could arguably be deprecated/disabled first/instead but:
I'm not sure I see the sense in keeping stuff around that's known to be
broken.
2021-05-12 13:37:18 +01:00
Bo Anderson
33e1255f65
formula_installer: write tab when pouring local --only-json-tab bottles 2021-05-11 14:28:12 +01:00
Mike McQuaid
b57fe84f81
Use long/readable tar flags.
Also, use `--no-same-permissions` instead of `-o` (which does nothing
without `-p` being passed and run as `root`) for the more explicit
description of the behaviour we want.
2021-04-16 14:05:06 +01:00
Mike McQuaid
96cd1c058e
utils/bottles: tweak/improve some of the API. 2021-04-16 14:05:05 +01:00
Bo Anderson
635e58e9aa
software_spec: fix bottle domain fallback handling 2021-04-15 19:24:25 +01:00
Mike McQuaid
75592cbebc
Better handle brew bottle --only-json-tab bottles
- test them in `brew test-bot` (before we do so in homebrew/core)
- don't fail if we cannot find the tab/install receipt in a bottle
- cache listing the files in a bottle so we don't do it more times than
  necessary
- fix resolution of version and formula names from a bottle if we're
  getting them from a bottle without a tab/install receipt

This will need to be in a tagged release before we can ship tab-less
bottles to users.
2021-04-13 14:26:31 +01:00
Mike McQuaid
0cb1645d25
bottles: support :all tag.
This allows the creation of bottles which will be used by any macOS
version, architecture or OS (i.e. macOS or Linux).

Add `TODO` stubs for where the bottle generation logic should be
implemented.
2021-04-09 09:50:16 +01:00
Mike McQuaid
6b5213286c
Rename "exact" tag match to "no_older_versions"
This is more specific about the behaviour we want to have in future.
2021-04-09 09:36:18 +01:00
Bo Anderson
20d86c0185
Refactor some tag handling into a Utils::Bottles::Tag class 2021-04-08 17:23:57 +01:00
Mike McQuaid
c8aea8653a
utils/bottles: remove unused method. 2021-04-01 17:37:15 +01:00
Mike McQuaid
d8a2cf9efc
Write tabs to bottle JSON, optionally not bottle
- Write a subset of the tab required for bottles as an annotation.
- Add option on new bottle creation to skip writing tab into bottle
  and instead add it (and other useful metadata) to bottle JSON.
- Read formula information and tab from bottle JSON.
- Write prettier JSON to disk.
- Don't write `HEAD` to tab; this duplicates `HOMEBREW_VERSION`.
- Allow `brew bottle` to use `--json` to generate JSON files from a
  local bottle file.
2021-03-31 09:43:37 +01:00
Bo Anderson
fb8b247db3
dev-cmd/unbottled: various improvements
* Ignore bottles for older macOS versions
* Ignore disabled formulae
* Ignore formulae which can't build on the chosen macOS
* Improve/fix sort description
2021-02-23 16:27:58 +00:00
Michka Popoff
3eea1434cc bottle: tag specific cellars 2021-01-19 10:14:25 +01:00
Seeker
b9854bd4cf rubocops: add unless_multiple_conditions 2021-01-08 10:33:54 -08:00
Seeker
24636d8bea utils/ast: cleanup
- move `add_bottle_stanza!` from `Utils::Bottles` to `Utils::AST`
- add `replace_bottle_stanza!`
- simplify parameters
2020-12-29 03:40:39 -08:00
Seeker
aaf7bc2bc5 utils: add AST helper functions for editing formulae 2020-12-22 22:05:23 -08:00
Mike McQuaid
323fec5032
utils/bottles: install bundler gems if necessary. 2020-12-11 12:26:45 +00:00
Seeker
b8aa67be5b bottle: add bottle stanza by traversing AST 2020-12-10 13:38:57 -08:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Seeker
5acdcd26d0 formula: rename installed_prefix to latest_installed_prefix 2020-09-01 09:32:32 -07:00
Markus Reiter
b90290b18c Refactor and document Bottles. 2020-08-23 04:44:57 +02:00
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Mike McQuaid
02cc419a23
utils/bottles: delegate methods. 2020-02-19 11:54:42 +00:00
Mike McQuaid
5dd8ead51a
Rename Formula#installed? to Formula#latest_version_installed?
This naming has always been a bit weird and confusing so let's change
it and provide a `compat` fallback for later deprecation.
2019-12-03 11:42:42 +00:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Markus Reiter
c4d418e126 Use ActiveSupport’s #second. 2018-10-07 23:10:56 +02:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Mike McQuaid
83cca40fc9 RuboCop 0.53.0 manual fixes. 2018-03-08 14:10:02 +00:00
Shaun Jackman
48ed28a154 Change the generic bottle tag to processor-system 2017-11-22 23:06:26 -08:00
Shaun Jackman
2e77de3b58 Fix installing a local bottle from source
Factor Utils::Bottles.formula_contents out of BottleLoader.
2017-09-28 12:29:23 -07:00
Shaun Jackman
1e57445eca receipt_path: Ensure the bottle contains INSTALL_RECEIPT.json 2017-09-27 09:36:41 -07:00
Dominyk Tiller
ff377bebc0
bottles: translate foo@1.2 to foo:1.2 2016-08-29 19:48:23 +01:00
Mike McQuaid
c3739dc441 utils/bottles: don't rely on tar wildcards, location.
This doesn’t work quite as-is on Linux’s GNU tar.
2016-07-29 21:21:02 -06:00
Mike McQuaid
541e8f28df bottles: more porting to generic layer. 2016-07-27 15:05:42 -06:00
Martin Afanasjew
44af0d80e8 utils/bottles: fix Regexp escaping for Ruby 1.8
Make sure `Regexp.escape` gets a string as Ruby 1.8 is unable to convert
the symbol to a string automatically. Related to changes from #168.
2016-05-08 20:35:52 +02:00
Mike McQuaid
931e292bf1 Make bottle code cross-platform. 2016-05-08 16:51:22 +01:00