Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add packer nightly formula #154

Closed

Conversation

sylviamoss
Copy link

This adds the packer nightly releases. The nightly releases are updated every 7 days.

I haven't tested the formula and would like some help with it.

Copy link
Contributor

@samsalisbury samsalisbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sylviamoss, I think this PR should include an update to util/formula_templater/config.hcl to add a template for packer-nightly but I’m not 100% if that supports conflicts_with and/or version "nightly".. I'll requests a review from @kpenfound as I think he will be in a better position to help with this hopefully!

@samsalisbury samsalisbury requested a review from kpenfound August 11, 2021 11:28
@sylviamoss
Copy link
Author

Got it! Thank you @samsalisbury

Comment on lines +35 to +37
def install
bin.install "packer"
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be a possibility and a good idea to rename the binary to packer-nightly here ? 🤔

@radeksimko
Copy link
Member

Just to add some context here, Homebrew unfortunately doesn't have any decent/clean way of supporting multiple versions and we have in the past avoided adding these - see also #79

That said I'm certainly not in a position to say this is still a current stance and that it applies specifically to nightly releases, I'm merely adding the context.

If you are going ahead with this as a separate formula I would suggest change the class name to something unique - e.g. PackerNightly, otherwise I think that the whole tap will break for everyone due to duplicate classes.

Secondly you may want to consider making the version stanza something unique as well - the static value ("nightly") otherwise prevents Homebrew from performing upgrades. You could in theory set it to :latest, if you want to avoid updating the formula with every nightly release. The trade-off is that users would have to use brew upgrade --greedy-latest to upgrade that formula. That :latest symbol is more often used for auto-updating software, such as Chrome though.

The conflicts_with should be fine here, but I am not sure that it does what you think it does. AFAIK that stanza always refers to core formulas, not formulas in a tap, i.e. conflicts_with "packer" refers to https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/packer.rb

As for the binary name - I don't have too strong opinion on this, but it seems that the convention in the wild is to retain the name used for all other versions as opposed to adding the version there.

See also https://github.com/Homebrew/linuxbrew-core/blob/HEAD/Formula/[email protected] for inspiration.

@sylviamoss
Copy link
Author

Thanks @radeksimko for the context. Know that I decided not to move forward with this. It makes sense to download non-stable nightly releases only from GitHub and making it explicit about it.

@sylviamoss sylviamoss closed this Aug 11, 2021
@sylviamoss sylviamoss deleted the packer_nightly_formula branch August 11, 2021 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants