fix getting latest release tag (#11908)
Co-authored-by: Marius Manea <marius@netdata.com>
maneamarius committed
Dec 15, 2021 at 15:20 UTC
0633e54dd167cc1c5d8944a6d7bb6b12520f0f47
5 files changed
+5
-9
packaging/installer/kickstart-static64.sh
+1
-1
@@ -186,7 +186,7 @@ set_tarball_urls() {
186
local latest
187
# Simple version
188
latest="$(download "https://api.github.com/repos/netdata/netdata/releases/latest" /dev/stdout | grep tag_name | cut -d'"' -f4)"
189
- export NETDATA_TARBALL_URL="https://github.com/netdata/netdata/releases/download/$latest/netdata-$latest.gz.run"
189
+ export NETDATA_TARBALL_URL="https://github.com/netdata/netdata/releases/download/$latest/netdata-latest.gz.run"
190
export NETDATA_TARBALL_CHECKSUM_URL="https://github.com/netdata/netdata/releases/download/$latest/sha256sums.txt"
191
else
192
export NETDATA_TARBALL_URL="$NETDATA_TARBALL_BASEURL/netdata-latest.gz.run"
packaging/installer/kickstart.sh
+1
-1
@@ -303,7 +303,7 @@ set_tarball_urls() {
303
local latest
304
# Simple version
305
latest="$(download "https://api.github.com/repos/netdata/netdata/releases/latest" /dev/stdout | grep tag_name | cut -d'"' -f4)"
306
- export NETDATA_TARBALL_URL="https://github.com/netdata/netdata/releases/download/$latest/netdata-$latest.tar.gz"
306
+ export NETDATA_TARBALL_URL="https://github.com/netdata/netdata/releases/download/$latest/netdata-latest.tar.gz"
307
export NETDATA_TARBALL_CHECKSUM_URL="https://github.com/netdata/netdata/releases/download/$latest/sha256sums.txt"
308
else
309
export NETDATA_TARBALL_URL="$NETDATA_TARBALL_BASEURL/netdata-latest.tar.gz"
packaging/installer/methods/kickstart-64.md
+1
-1
@@ -97,7 +97,7 @@ To use `md5sum` to verify the integrity of the `kickstart-static64.sh` script yo
97
command above, run the following:
98
99
```bash
100
-[ "78461a3055aee03011a577a716e2dee5" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
100
+[ "508e16775bfe8aaf6bc2d0f7b91c323e" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
101
```
102
103
If the script is valid, this command will return `OK, VALID`.
packaging/installer/methods/kickstart.md
+1
-1
@@ -96,7 +96,7 @@ To use `md5sum` to verify the integrity of the `kickstart.sh` script you will do
96
run the following:
97
98
```bash
99
-[ "7e8b449ca44e49b7074b5b9d6022cbcc" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
99
+[ "1e09c4908ee5a2b0afff92b380e72c27" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
100
```
101
102
If the script is valid, this command will return `OK, VALID`.
packaging/installer/netdata-updater.sh
+1
-5
@@ -181,10 +181,6 @@ get_netdata_latest_tag() {
181
fatal "I need curl or wget to proceed, but neither of them are available on this system."
182
fi
183
184
- if echo "${tag}" | grep -vEq "^v[0-9]+\..+"; then
185
- fatal "Cannot download latest stable tag from ${url}"
186
- fi
187
-
184
echo "${tag}" >"${dest}"
185
}
186
@@ -270,7 +266,7 @@ set_tarball_urls() {
266
267
if [ "$1" = "stable" ]; then
268
latest="$(get_netdata_latest_tag /dev/stdout)"
273
- export NETDATA_TARBALL_URL="https://github.com/netdata/netdata/releases/download/$latest/netdata-$latest.${extension}"
269
+ export NETDATA_TARBALL_URL="https://github.com/netdata/netdata/releases/download/$latest/netdata-latest.${extension}"
270
export NETDATA_TARBALL_CHECKSUM_URL="https://github.com/netdata/netdata/releases/download/$latest/sha256sums.txt"
271
else
272
export NETDATA_TARBALL_URL="$NETDATA_NIGHTLIES_BASEURL/netdata-latest.${extension}"