omni
omni copied to clipboard
`up`/`go`: add support to `go install` tools
This should support to go install tools at specific versions (or just at the latest).
When installed with specific versions, it could avoid calling go install each time and would only enforce the version to be installed.
e.g. instead of having to write:
env:
MYTOOL_VERSION: vX.Y.Z
up:
- go: auto
- custom:
name: Install my tool
met?: command -v mytool@${MYTOOL_VERSION}
meet: |
rm -f "${GOBIN}/mytool@"*
go install path.to/mytool@${MYTOOL_VERSION}
(cd "${GOBIN}" && ln -sf "./mytool" "./mytool@${MYTOOL_VERSION}")
We could simply write:
up:
- go:
version: auto
go-install:
- path.to/mytool: vX.Y.Z
And omni would take care of setting up and maintaining the version when omni up is called.