devops-works / binenv

One binary to rule them all. Manage all those pesky binaries (kubectl, helm, terraform, ...) easily.
MIT License
373 stars 44 forks source link

Can not add shell2http. Wrong version. #111

Closed patsevanton closed 3 years ago

patsevanton commented 3 years ago

Hello! Thanks for binenv! Try add shell2http

  shell2http:
    description: Executing shell commands via HTTP server
    map:
      i386: 386
    list:
      type: github-releases
      url: https://api.github.com/repos/msoap/shell2http/releases
    fetch:
      url: https://github.com/msoap/shell2http/releases/download/{{ .Version }}/shell2http-{{ .Version }}.{{ .OS }}.{{ .Arch }}.tar.gz
    install:
      type: tgz
      binaries:
        - shell2http

Try install shell2http

binenv install shell2http
2021-06-03T14:19:04+06:00 WRN version for "shell2http" not specified; using "1.13.0"
2021-06-03T14:19:05+06:00 ERR unable to install "shell2http" (1.13.0) error="unable to download binary at https://github.com/msoap/shell2http/releases/download/1.13.0/shell2http-1.13.0.linux.amd64.tar.gz: 404 Not Found"

View cache.json

cat cache.json | jq .shell2http
[
  "1.13.0",
  "1.12.0",
  "1.11.0",
  "1.10.0",
  "1.9.0",
  "1.8.0",
  "1.7.0",
  "1.6.0",
  "1.5.0",
  "1.4.0",
  "1.3.0",
  "1.2.0",
  "1.1.0"
]
leucos commented 3 years ago

Hello @patsevanton; thanks a lot for all the PRs ! I will check them asap.

Since the link does not contain the path version, you might want to use:

url: https://github.com/msoap/shell2http/releases/download/{{ .VersionMajor }}.{{ .VersionMinor }}/shell2http-{{ .VersionMajor }}.{{ .VersionMinor }}.{{ .OS }}.{{ .Arch }}.tar.gz

patsevanton commented 3 years ago

Thanks!