Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update custom homebrew taps #2738

Closed
achew22 opened this issue Nov 3, 2018 · 4 comments · Fixed by #3530
Closed

Update custom homebrew taps #2738

achew22 opened this issue Nov 3, 2018 · 4 comments · Fixed by #3530
Assignees
Labels
new package manager New package manager support priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@achew22
Copy link

achew22 commented Nov 3, 2018

What would you like Renovate to be able to do?

It would be really nice if Renovate Bot could update a homebrew tap automatically so that the latest release is always what is available from homebrew.

Describe the solution you'd like

For binaries that are live as a github archive and are compiled (example) it would be really nice if you could detect those, find the latest version and send a PR to update it and the sha256 of the latest tag.

Describe alternatives you've considered

Doing it manually 😦

Additional context

Thanks so much!

@rarkins rarkins added type:feature Feature (new functionality) ready priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others labels Nov 4, 2018
@rarkins
Copy link
Collaborator

rarkins commented Nov 4, 2018

@rarkins rarkins removed the ready label Nov 4, 2018
@rarkins
Copy link
Collaborator

rarkins commented Nov 4, 2018

fileMatch: ^Formula/[^/]+\.rb$

Initially let's support github-hosted ones only, e.g.

class Ibazel < Formula
  desc 'IBazel is a tool for building Bazel targets when source files change.'
  homepage 'https://github.com/bazelbuild/bazel-watcher'
  url "https://github.com/bazelbuild/bazel-watcher/archive/v0.6.0.tar.gz"
  sha256 '819ae4ff201f62e769e627335b122c84a472671b80d6fa0407b157c0c982b219'

Note the inconsistent use of " vs ' above

Generating the sha256 seems similar to how we actually do it for bazel updates too.

Anecdote: the homebrew core project has nearly 3500 projects in in its Formula folder: https://github.com/Homebrew/homebrew-core/tree/master/Formula

@rarkins
Copy link
Collaborator

rarkins commented Nov 29, 2018

This will be a new manager named "homebrew" in lib/managers/homebrew

fileMatch: ^Formula/[^/]+\.rb$

Parse it line-by-line, look for any class X < Formula

If URL matches https://github.com/*/*/archive/<valid semver>.tar.gz then add it as a valid dep, otherwise skip it.

Use existing github datasource, filtering for releases.

The update will need to download the calculate the sha256 whenever the file has changed (don't recalculate if the file was already updated)

@rarkins rarkins added the new package manager New package manager support label Mar 8, 2019
@rarkins rarkins added review and removed ready labels Apr 11, 2019
@renovate-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 16.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
gidoichi referenced this issue in gidoichi/homebrew-tap May 10, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
new package manager New package manager support priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants