Skip to content

Commit 0ac21fc

Browse files
authored
fix: update latest logic
1 parent 08e9d33 commit 0ac21fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

install-influxdb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cd /tmp
22
if [ "$INFLUXDB_VERSION" = "latest" ];
33
then
4-
export INFLUXDB_VERSION=$(curl --silent "https://api.github.com/repos/influxdata/influxdb/releases/latest" | jq -r .tag_name | sed -e 's/v//g')
4+
export INFLUXDB_VERSION=$(curl --silent "https://api.github.com/repos/influxdata/influxdb/releases" | jq -r '. | sort_by(.tag_name) | reverse[] | .tag_name' | sed -e 's/v//g' | head -n 1)
55
export INFLUXDB_DOWNLOAD_PATH="https://dl.influxdata.com/influxdb/releases"
66
elif [ "$INFLUXDB_VERSION" = "nightly" ];
77
then

0 commit comments

Comments
 (0)