403 Commits
Author SHA1 Message Date
Mike McQuaid 3381cbf5c7 Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Bo Anderson 846166c62f utils/gems: prioritise Homebrew's chosen Ruby 2020-04-05 15:38:10 +01:00
Dawid Dziurla e1ce5c852d github: return output if JSON parsing is not desired 2020-04-01 13:23:54 +02:00
Jonathan Chang 39040fba8b utils/github: properly use token scopes 2020-03-31 22:11:06 +11:00
Jonathan Chang 5b1d0786a4 utils/github: add fetch_artifact API 2020-03-30 22:18:19 +11:00
Vítor Galvão 2e8aa3eb97 Use long --disable instead of short -q in curl 2020-03-29 20:04:37 +01:00
Bo Anderson 119b3fe69a utils/shebang: add rewrite_shebang 2020-03-27 13:04:39 +00:00
Jonathan Chang 7c752e487f pr-publish: wording fixes 2020-03-24 12:31:58 +11:00
Jonathan Chang 4bb66c12e8 utils/github: add repository_dispatch API 2020-03-22 13:24:07 +11:00
Markus Reiter 50b61fa7f2 Retry curl requests 3 times by default. 2020-03-20 18:40:43 +01:00
Mike McQuaid 1e265247ca rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Mike McQuaid 8f98b2bcc4 analytics: tweak behaviour.
- Use separate method for `not_this_run?` so we can still set the
  analytics message as seen when set.
- Clarify when analytics message is printed that we haven't sent any
  analytics yet.
2020-02-22 17:13:51 +00:00
Mike McQuaid 02cc419a23 utils/bottles: delegate methods. 2020-02-19 11:54:42 +00:00
Mike McQuaid f31e01c3ad test: set Git name and email.
Extract the code from `bottle.rb` into `utils/git.rb` and ensure it's
run before we run tests.

Should resolve issues like in
https://github.com/Homebrew/homebrew-core/pull/50328
2020-02-17 19:40:44 +00:00
Mike McQuaid bbe300ab2a Merge pull request #6983 from GauthamGoli/argv-cleanup-9
ARGV: Replace ARGV.verbose? with Homebrew.args.verbose?
2020-02-02 15:41:47 +01:00
Gautham Goli acde828a45 ARGV: Replace ARGV.verbose? with Homebrew.args.verbose? 2020-02-02 14:00:04 +01:00
Mike McQuaid 8471421c86 utils/ruby.sh: fix macOS portable Ruby detection.
Avoid unconditionally installing due to a variable name change.
2020-02-01 19:10:17 +01:00
Mike McQuaid 0b09c07862 ruby.sh: fix whitespace and tweak required ruby version check. 2020-02-01 12:49:35 +01:00
Emre ErhanandMike McQuaid cad7f98527 Clean up variable names
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-01-31 15:17:32 -08:00
emreerhan a1102f253c Remove checks to variable that is not set anywhere 2020-01-30 15:48:41 -08:00
emreerhan 027cc68534 Add condition to check if ruby version is < 2.7 2020-01-30 15:01:26 -08:00
Mike McQuaid 8ad50cd4dc utils/github: refactor and update logic.
- better handle `HOMEBREW_GITHUB_API_USERNAME` and
  `HOMEBREW_GITHUB_API_PASSWORD` from `brew gist-logs`
- only user personal access tokens from the macOS keychain (fixes #6862)
- general refactoring and cleanup around the above
2020-01-09 16:13:44 +00:00
Mike McQuaid 682ac2a3b8 utils/gems: hardcode bundler version.
This should avoid issues like those described in:
https://discourse.brew.sh/t/bump-pr-formula-bundler-version/6520/3
2020-01-01 15:47:06 +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
Maxim Belkin 2735663dc3 GitHub Actions: get username if we don't have it 2019-11-25 16:43:29 -06:00
Mike McQuaid 6d6d2c0bbf utils/analytics: fix refactoring rename.
Fixes a bug from #6639.
2019-11-22 10:39:16 +00:00
Mike McQuaid 3a9f585ebb Move more code to utils/analytics. 2019-11-22 09:10:29 +00:00
Mike McQuaid 28635a7fe4 Merge pull request #6723 from maxim-belkin/gh-actions/no-fork-prs
bump-formula-pr: enable same-repo (no-fork) Pull Requests
2019-11-22 09:06:48 +00:00
Maxim BelkinandMike McQuaid c7f065b8da utils/github.rb: use parallel assignments rather than indices
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2019-11-21 11:13:10 -06:00
Maxim Belkin 845f65b945 Factor out some code into functions 2019-11-21 11:13:10 -06:00
Alexander Bayandin b7b5a60f86 utils/inreplace: do not allow to use empty list of files 2019-11-21 16:49:06 +00:00
Dawid Dziurla f90612ccf0 bump-formula-pr: make it usable on linux
This commit makes it possible to use `bump-formula-pr` on linux to
contribute to `homebrew-core` as easily as it is on macOS, but with some
additional steps made before actual bumping of the formula.

Differences in the process (before bumping):
- add `homebrew-core` remote named `homebrew`
- fetch `homebrew/master`
- check if formula exists in `homebrew-core`
- switch to `homebrew/master` ref
2019-11-15 13:22:31 +01:00
Mike McQuaid 3609101728 utils/gems: fix finding bundler.
Need to specify the executable name not variable here.
2019-11-01 17:04:27 +00:00
Mike McQuaid 77531166d6 Use bundler from Ruby 2.6
Now Ruby comes with its own bundler let's favour using it when we can
over requiring a system one be installed.

This avoids needing to have anything in `~/.gem` again.

I am somewhat optimistic this may help with #6579 but it's useful
by itself.
2019-10-30 13:49:17 +00:00
Markus Reiter d37831219d Use temp file for calculating hash. 2019-10-29 19:50:07 +01:00
Markus Reiter 7a5e4d1269 Remove User::automation_access?. 2019-10-22 07:38:35 +02:00
Markus Reiter 0a175c4feb Merge pull request #6625 from reitermarkus/rubocop-namespace
Fix RuboCop namespace.
2019-10-22 01:46:05 +02:00
Markus Reiter f099d44021 Add GitHub::create_check_run function. 2019-10-21 20:12:31 +02:00
Markus Reiter 6c03cc0040 Fix RuboCop namespace. 2019-10-21 20:09:56 +02:00
Mike McQuaid cbf458ea9c Lint/ElseAlignment: ignore some bugged autocorrections. 2019-10-14 09:03:02 +01:00
Issy Long e5e28fbd69 Auto-fix more Layout/IndentationWidth offenses
- These didn't appear in the first pass as the other offense fixes caused them.
2019-10-13 16:04:30 +01:00
Issy Long 245c61017f Auto-fix Layout/ElseAlignment offenses 2019-10-13 16:04:28 +01:00
Issy Long 341ea60807 Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Mike McQuaid e9aba2efb6 Require and provide portable Ruby 2.6.3. 2019-10-10 15:53:16 +01:00
Mike McQuaid 36bc11b01a utils/shell: match preferred shell by symbol. 2019-10-08 12:10:31 +01:00
David O'TrakounandMike McQuaid 5ca4b43383 Update Library/Homebrew/utils/shell.rb
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2019-10-07 10:25:41 -04:00
David O'Trakoun 960b8b659c Support for zsh ZDOTDIR, FIX #6533
- Add test spec with ZDOTDIR set and unset
2019-10-06 12:40:18 -04:00
Markus Reiter a49282c318 Simplify return value logic. 2019-10-04 23:39:26 +02:00
Markus Reiter 9df563f25f Add Tty::color?. 2019-10-04 23:39:25 +02:00
Markus Reiter b1d0c61fea Update Gems. 2019-10-03 09:22:44 +02:00