Arc Forumnew | comments | leaders | submitlogin
Using github with the hackinator
3 points by aw 5648 days ago | discuss
Aha, I think I've figured this out.

The question is, suppose you like git and github.com for developing and sharing your Arc code, is there an easy way to publish your library with a URL that people can use with the hackinator? (http://awwx.ws/hackinator)

For the hackinator to work right, each different version of a library needs to be published at a different URL. This can be as simple as incrementing a version number in the filename for each release ("foo0.arc", "foo1.arc", "foo2.arc", etc.) or putting the version in the path ("v0/foo.arc", "v1/foo.arc", "v2/foo.arc", etc.) It doesn't matter what naming convention you use, as long as you don't update an already published file in place.

With git and github, we don't want to use the HEAD, since that changes on every commit. However, github gives each tag its own URL. If you go in to your repository on github, click on the "all tags" menu, select a tag, and then browse to a file in your repository, and click on "raw", you'll get a URL that looks like this:

  http://github.com/username/repo/raw/tag/path/file
as long as you don't delete or reuse a tag, this URL will be an immutable reference to your library file at that tagged version.

So, you can develop, commit, develop, commit... Then, when your new version is ready, just tag your repository. For someone to now use your library using the hackinator, all they need is for you to tell them the URL. The "http://" is optional when using the hackinator, so they can use your library like this:

  $ hack ycombinator.com/arc/arc3.1.tar \
      github.com/username/repo/raw/tag/path/file