robertdfrench / git-pr

Pull requests without Git(Hub|Lab)
GNU General Public License v3.0
0 stars 1 forks source link

How will we handle installation? #31

Open robertdfrench opened 3 years ago

robertdfrench commented 3 years ago

Between the git-pr binaries and their associated documentation (#29) we are looking at distributing about a dozen artifacts to end users. What options do we have for installation?

1. Let Cargo Do it

The easiest path may be to distribute via crates.io. While intended for libraries, some binaries are distributed this way, though mostly only stuff intended as Rust development tools (clippy, et al). That might look like this:

$ cargo install git-pr
...downloading...
...compiling...
...installing???

I don't know for sure if cargo supports installing things in system-wide paths, or if it will only install them within the user's home directory. git is smart enough to find the binaries as long as they are in $PATH, but man won't be able to find the documentation unless its in $MANPATH, which users are much less likely to want to customize.

2. Write some bogus script

If we'll always be targeting a bash-capable environment (thinking of GitBash for Windows here), then we could:

  1. Find the right analogue of /usr/local/libexec/git, and try to put the binaries there
  2. Find an appropriate spot on the filesystem to stick the man pages
  3. Figure out what GitBash's interpretation of "sudo" would be on Windows

3. Integrate with package managers

This would be by far the most work, but probably also the best solution for users.

calebwherry commented 3 years ago

If at all possible, I would really like to stay away requiring GitBash on Windows. I'll have to play around with this on but I should be able to get it to work without too much work. That's just the exes though, not sure how to tackle man page since that's just not a thing on windows. Maybe if we support man on windows, we say it has to be through GitBash. Otherwise I don't think it makes much sense.

I do agree working with package managers is the best way but does cause us the most work. But since our install is fairly simple, it might to not be too much work...

robertdfrench commented 3 years ago

Ahh, I misunderstood, I thought we had landed on GitBash as a requirement (though now that you mention it, I do remember seeing you use mingw).

Re: man pages on windows, can you tell me if man git-pull even works? And if so, what does man -W git-pull say is the location of that man page?

robertdfrench commented 3 years ago

I think we can copy a lot from RipGrep. They provide builds for macOS, Windows, and Linux (Debian?), and also have (whether by their own work or from community volunteers, I don't know) integration with a ton of other packaging systems.