Closed jakubvokoun closed 1 year ago
Thanks for the PR @jakubvokoun
For now, the only solution is to create 2 distinct entries in distributions.yaml. The problem with this is that the resulting binary name is created from the distribution name.
Thus, having something like:
foo-linux:
...
supported_platforms:
- os: linux
arch: arm64
foo-mac:
....
supported_platforms:
- os: darwin
arch: arm64
will "create" a binary foo-linux
on linux and foo-mac
on mac. Not very sexy.
May be the best option would be to allow a name override in distributions.yaml
, but is has several side effects (search being one).
This being said, thanks for the PR ! Will merge it rsn.
@leucos
May be the best option would be to allow a name override in distributions.yaml, but is has several side effects (search being one).
I came up with a possibility of overriding distributions.yaml for specific architecture, for example like this:
# distributions.yaml
app-foo:
# ...
fetch:
url: https://github.com/turbot/steampipe/releases/download/v{{ .Version }}/steampipe_{{ .OS }}_{{ .Arch }}.tar.gz
install:
type: tgz
# distributions_darwin.yaml
app-foo:
fetch:
url: https://github.com/turbot/steampipe/releases/download/v{{ .Version }}/steampipe_{{ .OS }}_{{ .Arch }}.zip
install:
type: zip
Only the fetch
and install
parts would be overriden. And there would be no issue with the name of created binary.
The only downside would be the maintenace of another distributions file. The chagnes in go
code would be minimal. But I'm not sure if it's worth the effort.
Sadly there's a mismatch in archive types - .tar.gz for Linux and .zip for Darwin. So I added only Linux support.
I think this situation could be handled. @leucos, what do you think?