@cryptotaxi247 / netdata-1 / commits / d12888931

Fixed updater bug introduced by incomplete variable rename in #8808. (#9834)

* Revert "Fix handling of NETDATA_NIGHTLIES_BASEURL." This reverts commit 381615279b59941d91db0cd5af91a5119f22adf1. It did not actually fix the issue and in fact solved someething that is only a problem in certain very strange configurations (or when the developer isn't paying proper attention and tests things incorrectly). * Fixed incomplete variable rename from #8808. Only some instances of NETDATA_TARBALL_BASEURL were changed, resulting in the updater being broken for nightly installs.

Austin S. Hemmelgarn committed Aug 27, 2020 at 11:47 UTC d128889316cb27a909e617f5f9a1869709aec30b
1 file changed +3 -3
packaging/installer/netdata-updater.sh
+3 -3
@@ -17,7 +17,7 @@
17 # Optional environment options:
18 #
19 # - TMPDIR (set to a usable temporary directory)
20 -# - NETDATA_TARBALL_BASEURL (set the base url for downloading the dist tarball)
20 +# - NETDATA_NIGHTLIES_BASEURL (set the base url for downloading the dist tarball)
21 #
22 # Copyright: SPDX-License-Identifier: GPL-3.0-or-later
23 #
@@ -141,7 +141,7 @@ get_latest_version() {
141 if [ "${RELEASE_CHANNEL}" == "stable" ]; then
142 latest="$(download "https://api.github.com/repos/netdata/netdata/releases/latest" /dev/stdout | grep tag_name | cut -d'"' -f4)"
143 else
144 - latest="$(download "$NETDATA_TARBALL_BASEURL/latest-version.txt" /dev/stdout)"
144 + latest="$(download "$NETDATA_NIGHTLIES_BASEURL/latest-version.txt" /dev/stdout)"
145 fi
146 parse_version "$latest"
147 }
@@ -272,7 +272,7 @@ export NETDATA_LIB_DIR="${NETDATA_LIB_DIR:-${NETDATA_PREFIX}/var/lib/netdata}"
272 [[ -z "${NETDATA_TARBALL_CHECKSUM}" ]] && [[ -f ${NETDATA_LIB_DIR}/netdata.tarball.checksum ]] && NETDATA_TARBALL_CHECKSUM="$(cat "${NETDATA_LIB_DIR}/netdata.tarball.checksum")"
273
274 # Grab the nightlies baseurl (defaulting to our Google Storage bucket)
275 -[ -z "${NETDATA_NIGHTLIES_BASEURL}" ] && export NETDATA_NIGHTLIES_BASEURL="https://storage.googleapis.com/netdata-nightlies"
275 +export NETDATA_NIGHTLIES_BASEURL="${NETDATA_NIGHTLIES_BASEURL:-https://storage.googleapis.com/netdata-nightlies}"
276
277 if [ "${INSTALL_UID}" != "$(id -u)" ]; then
278 fatal "You are running this script as user with uid $(id -u). We recommend to run this script as root (user with uid 0)"