What is the best way to distribute a binary of my

2019-02-12 10:31发布

I have a small github repo to convert MS Word Documents, but most people will just want the binary.

Should I

  • Reorganise my repo to have a src/ and bin/ directories with the most up to date .exe in with the code and expect people to download the whole lot?
  • Compile and place my binary somewhere else on the web and link to it?
  • Include my binary in my repo but link to it seperately?

3条回答
仙女界的扛把子
2楼-- · 2019-02-12 10:54

You can try this: http://sourceforge.net/publish/?source=github

It looks promising to be able to "create on Github but distribute on Sourceforge".

查看更多
成全新的幸福
3楼-- · 2019-02-12 11:02

To host that binary for your application, you now can, since 2nd July 2013, define a release.

Releases, a workflow for shipping software to end users.
Releases are first-class objects with changelogs and binary assets that present a full project history beyond Git artifacts. They're accessible from a repository's homepage:

homepage

  • Releases are accompanied by release notes and links to download the software or source code.
  • Following the conventions of many Git projects, releases are tied to Git tags. You can use an existing tag, or let releases create the tag when it's published.
  • You can also attach binary assets (such as compiled executables, minified scripts, documentation) to a release. Once published, the release details and assets are available to anyone that can view the repository.

release

That replaces the old binary upload service, which was removed in December 2012 (as you mention in your question).

查看更多
放我归山
4楼-- · 2019-02-12 11:17

Probably not what you want to hear, but in your case this is mostly personal preference.

You don't have to store the binary in the repo, because it is no important dependency. It is the other way around: everything you need to recreate the file should be in your repository (including Makefiles/project files).

You can store the binary in the repo because it is fairly small. You should not store it in the repository when the overall size in the repository (base size + diffs, depending how big the diffs are) is overwhelming, but this does not seem to be the case (500 KiB according to your repo).


My personal preference is to never store generated files (binaries, but also generated text files) in the repo. Possibly because I have experience with 2 GiB csv repositories that take ages to pull. (to be fair: it also takes ages to compile)

For my github project I created a subdomain on some webspace where I put all my downloads and the index page of that subdomain forwards to my github-pages. The github pages link to the downloads on my webspace subdomain. Just because I like my github subdomain a bit more for this project.

My tool works for different platforms though, so not every user needs every binary file. The binaries actually are backends (therefore dependencies), but interchangeable/optional

You can have a look at my setup.

查看更多
登录 后发表回答