Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Allow for passing additional params used in installation of tools #55

Open
pgt502 opened this issue Jan 16, 2019 · 3 comments
Open

Allow for passing additional params used in installation of tools #55

pgt502 opened this issue Jan 16, 2019 · 3 comments

Comments

@pgt502
Copy link

pgt502 commented Jan 16, 2019

Currently, each tool is installed using go install command which is pretty limiting. Certain tools require arguments to be passed in when building them. In order to accommodate that, the go build command needs to be used.

Solution

Allow for passing extra parameters when building each tool which can be defined in the tools.json.

For example:

{
      "Repository": "github.com/golang-migrate/migrate/cli",
      "Commit": "4937cd088f7c7193ee59b319c1c2caa7482aae8e",
      "ExecutableName": "migrate",
      "PreParams": [
          "-tags", 
          "'postgres'"
      ]
    }

PreParams are the arguments passed in just after go build command and before the path and other arguments, which in this example will result in:

go build -tags 'postgres' -o <toolDirPath>/bin/migrate github.com/golang-migrate/migrate/cli
@spenczar
Copy link
Contributor

Can we perhaps narrow this to only being about build tags, rather than arbitrary arguments? That's a lot simpler to reason about.

@pgt502
Copy link
Author

pgt502 commented Mar 28, 2019

Yes, I agree it would make it much simpler, however, if it is likely that other parameters will be needed in the future, it might make sense to implement it more generically. What do you think?

@wizardishungry
Copy link

Came here for this exact utility and tag

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants