From 1de0d12de96289350780e7dd34905ab2e9fbec88 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 16 Jun 2020 12:26:06 +0200 Subject: #984: Installer and updater download the OGAgent tarball defined in the version file. --- doc/VERSION.json | 9 +++++---- installer/opengnsys_installer.sh | 11 ++++++++--- installer/opengnsys_update.sh | 9 +++++++-- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/doc/VERSION.json b/doc/VERSION.json index 13d23c33..70998abf 100644 --- a/doc/VERSION.json +++ b/doc/VERSION.json @@ -1,7 +1,8 @@ { "project": "OpenGnsys", - "version": "1.1.1c", - "codename": "Espeto", - "definition": "http://www.andalucia.com/gastronomy/espeto.htm", - "release": "" + "version": "1.2.0", + "codename": "", + "definition": "", + "release": "", + "ogagent": "1.1.1b" } diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index a1586067..684ecc6c 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1101,9 +1101,14 @@ function installWebFiles() # Copiar ficheros en la zona de descargas de OpenGnsys Web Console. function installDownloadableFiles() { - local FILENAME=ogagentpkgs-$INSTVERSION.tar.gz - local TARGETFILE=$WORKDIR/$FILENAME - + local VERSIONFILE OGVERSION FILENAME TARGETFILE + + # Obtener versión a descargar. + VERSIONFILE="$INSTALL_TARGET/doc/VERSION.json" + OGVERSION="$(jq -r ".ogagent // \"$INSTVERSION\"" $VERSIONFILE 2>/dev/null || echo "$INSTVERSION")" + FILENAME="ogagentpkgs-$OGVERSION.tar.gz" + TARGETFILE=$WORKDIR/$FILENAME + # Descargar archivo comprimido, si es necesario. if [ -s $PROGRAMDIR/$FILENAME ]; then echoAndLog "${FUNCNAME}(): Moving $PROGRAMDIR/$FILENAME file to $(dirname $TARGETFILE)" diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index aa981c0a..b562c9cf 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -742,8 +742,13 @@ function updateWebFiles() # Copiar ficheros en la zona de descargas de OpenGnsys Web Console. function updateDownloadableFiles() { - local FILENAME=ogagentpkgs-$NEWVERSION.tar.gz - local TARGETFILE=$WORKDIR/$FILENAME + local VERSIONFILE OGVERSION FILENAME TARGETFILE + + # Obtener versión a descargar. + VERSIONFILE="$INSTALL_TARGET/doc/VERSION.json" + OGVERSION="$(jq -r ".ogagent // \"$NEWVERSION\"" $VERSIONFILE 2>/dev/null || echo "$NEWVERSION")" + FILENAME="ogagentpkgs-$OGVERSION.tar.gz" + TARGETFILE=$WORKDIR/$FILENAME # Descargar archivo comprimido, si es necesario. if [ -s $PROGRAMDIR/$FILENAME ]; then -- cgit v1.2.3-18-g5258