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

installer: homebrew #308

Closed
Gankra opened this issue Aug 9, 2023 · 2 comments
Closed

installer: homebrew #308

Gankra opened this issue Aug 9, 2023 · 2 comments

Comments

@Gankra
Copy link
Member

Gankra commented Aug 9, 2023

It would be nice for cargo-dist to be able to generate a homebrew formula for your package, similar to the npm installer, which:

  • detects your platform (constructs a target triple)
  • fetches your prebuilt binaries
  • unpacks them as appropriate for a homebrew package

Initial discussion is that this requires us to:

  • generate a ruby script ("the formula")
  • help the user define a tap for their formulas (git repo containing some text files)
    • easiest might be adding a formulas/ dir to the root of their actual project

I expect that much of the logic here will be shared with the "shell" installer. Hopefully a lot of the places that need to be changed can be found by just adding a new variant to this enum and following the compiler errors.

/// A style of installer to generate
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
pub enum InstallerStyle {
/// Generates a shell script that fetches/installs the right build
Shell,
/// Generates a powershell script that fetches/installs the right build
Powershell,
/// Generates an npm project that fetches the right build to your node_modules
Npm,
}

@Gankra
Copy link
Member Author

Gankra commented Aug 9, 2023

If you want to publish a GUI, you want cask (#309)

@Gankra Gankra added this to the 0.2.0 milestone Aug 9, 2023
@Gankra Gankra modified the milestones: 0.3.0, 0.2.0 Aug 21, 2023
@Gankra
Copy link
Member Author

Gankra commented Aug 29, 2023

done in #318, #339, and #353 and available in 0.2.0-prerelease.6 (0.2.0 out this week)

🎊

@Gankra Gankra closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants