Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: port architecture and OS introspection support from gruntwork-install #47

Open
yorinasub17 opened this issue Jan 30, 2019 · 1 comment
Labels
enhancement New feature or request needs design We need to flesh out the design before we can resolve the issue

Comments

@yorinasub17
Copy link
Contributor

gruntwork-install has the ability to introspect the OS and architecture of the system to determine which binary asset to install.

I can see why this is not in fetch, which is more generic and thus cannot rely on our naming conventions, but it would be nice if that functionality was baked into fetch itself. The primary use case for this would be Windows support. gruntwork-install is implemented in bash, which means it can't be used in most Windows environments. It would be nice if we can port that functionality into fetch, so that we can support Windows too.

Notes:

  • I am not sure how to make this more generic. Perhaps we can assume our naming convention, and then if it doesn't match have an interactive prompt to select the correct one, sorting the list by name introspection?
  • Alternatively, we can reimplement gruntwork-install to be in python or Go so that it is portable.
@yorinasub17 yorinasub17 added enhancement New feature or request help wanted needs design We need to flesh out the design before we can resolve the issue and removed help wanted labels Jan 30, 2019
@brikis98
Copy link
Member

brikis98 commented Jan 30, 2019

This seems like a good idea.

Perhaps we could expose a --name-template option that is a Go template with a default of:

{{ .BinaryName }}_{{  .OsName }}_{{ .ArchName }}

The default will work for many use cases, but when necessary, users can override that with any Go template syntax of their choice and fetch will fill in those variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs design We need to flesh out the design before we can resolve the issue
Projects
None yet
Development

No branches or pull requests

2 participants