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
589 stars 90 forks source link

Two Digit Versions #24

Closed keidrych closed 6 years ago

keidrych commented 7 years ago

Hi All,

While SemVer requires X.Y.Z it would be great to support X.Y as well as this is also a common version format used in GitHub.

To illustrate: fetch --repo="https://github.com/dnephin/dobi" --tag=">=0.9" --release-asset="dobi-windows.exe" %CMDER_ROOT%\bin Fails, while fetch --repo="https://github.com/dnephin/dobi" --tag="v0.9" --release-asset="dobi-windows.exe" %CMDER_ROOT%\bin Works but the 'v' is required to make this work.

brikis98 commented 7 years ago

Seems like a reasonable addition. PRs welcome :)

josh-padnick commented 7 years ago

Fetch uses https://github.com/hashicorp/go-version under the hood to satisfy version checks, which does support version tags of the form X.Y, so I'm guessing that there's a bug in this function.