gruntwork-io / fetch

Download files, folders, and release assets from a specific git commit, branch, or tag of public and private GitHub repos.
https://www.gruntwork.io/
MIT License
595 stars 87 forks source link

Release asset #13

Closed brikis98 closed 8 years ago

brikis98 commented 8 years ago

This PR allows fetch to download not only source files from GitHub repos, but also binary files from GitHub releases. It’s easy to download a release asset from a public repo, as you can just wget the URL, but for private repos, it’s a confusing, painful, multi-step process that involves making several API calls. There is an SO thread about it which would probably love to hear that fetch makes this an easy one-step process.

As part of this PR, I’ve also made a few other tweaks:

  1. Added support to fetch to read the GITHUB_OAUTH_TOKEN from an env var, which is much safer than as a command line option.
  2. Instead of a filter passed as a command-line arg, you can now specify one or more paths to download from the source code using the --source-path option.
  3. Similarly, you can download one or more release assets using the --release-asset option.
brikis98 commented 8 years ago

@josh-padnick I think you're out at a conference today, so I'm going to merge to unblock myself. Please review when you get back.

josh-padnick commented 8 years ago

This is still queued up for my review, but I wanted the record to reflect it closes https://github.com/gruntwork-io/fetch/issues/7 and https://github.com/gruntwork-io/fetch/issues/9.