pulsarctl icon indicating copy to clipboard operation
pulsarctl copied to clipboard

Updated version check to use github API and pull latest release

Open Zand3r24 opened this issue 2 years ago • 1 comments

Fixes #854

Motivation

install.sh references a static file inn the repo, stable.txt which hasn't been updated for some time. The install.sh script is referenced by other projects (I stumbled on this from the apache pulsar helm chart https://github.com/apache/pulsar-helm-chart/blob/8ad7cf6b6508a23546a8d5a66e5319cf36f39712/scripts/pulsar/common_auth.sh#L61). This change would prevent anyone from having to update stable.txt manually again (at least as far as the install.sh script is concerned).

Modifications

version=$(curl -s https://api.github.com/repos/streamnative/pulsarctl/releases/latest | grep tag_name | sed -r 's/.(v[[:digit:]]+(.[[:digit:]]+)+)./\1/')

This change is a trivial rework / code cleanup without any test coverage.

Documentation

  • [x] no-need-doc

This is an automated script.

Zand3r24 avatar Jan 31 '23 22:01 Zand3r24

The pulsarctl doesn't release separately, which releases with streamnative/pulsar, so there have multiple versions, so like: 2.9.x, 2.10.x, and 2.11.x, your command only downloads the latest version released recently, this version is not fixed, the version maybe is 2.10.x, or 2.11.x, or 2.9.x.

nodece avatar Feb 06 '23 09:02 nodece