Use the built agentversion for Netdata static build archive name. (#12335)
This ensures that the version reported by `netdata -v` will match up with the version number embedded in the static build archive file names.
Austin S. Hemmelgarn committed
Mar 22, 2022 at 08:49 UTC
f7579fee54846a04c6445a9dd18d1c279bc13246
1 file changed
+1
-4
packaging/makeself/jobs/99-makeself.install.sh
+1
-4
@@ -12,10 +12,7 @@ run cd "${NETDATA_SOURCE_PATH}" || exit 1
12
# -----------------------------------------------------------------------------
13
# find the netdata version
14
15
-VERSION="$(git describe 2> /dev/null)"
16
-if [ -z "${VERSION}" ]; then
17
- VERSION=$(cat packaging/version)
18
-fi
15
+VERSION="$("${NETDATA_INSTALL_PARENT}/netdata/bin/netdata" -v | cut -f 2 -d ' ')"
16
17
if [ "${VERSION}" == "" ]; then
18
echo >&2 "Cannot find version number. Create makeself executable from source code with git tree structure."