diff options
Diffstat (limited to 'installer')
-rwxr-xr-x | installer/opengnsys_installer.sh | 2 | ||||
-rwxr-xr-x | installer/opengnsys_makecompress.sh | 6 | ||||
-rwxr-xr-x | installer/opengnsys_update.sh | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 883ef19e..0e93d92d 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1558,7 +1558,7 @@ function installationSummary() # de código o si no está incluida en el fichero de versión. if [ $REMOTE -eq 1 ] || [ -z "$(jq -r '.release' $VERSIONFILE)" ]; then # Revisión: rAñoMesDía.Gitcommit (8 caracteres de fecha y 7 primeros de commit). - REVISION=$(curl -s "$API_URL" | jq '"r" + (.commit.commit.committer.date | gsub("-"; "")[:8]) + "." + (.commit.sha[:7])') + REVISION=$(curl -s "$API_URL" | jq '"r" + (.commit.commit.committer.date | split("-") | join("")[:8]) + "." + (.commit.sha[:7])') jq ".release=$REVISION" $VERSIONFILE | sponge $VERSIONFILE fi VERSION="$(jq -r '[.project, .version, .codename, .release] | join(" ")' $VERSIONFILE 2>/dev/null)" diff --git a/installer/opengnsys_makecompress.sh b/installer/opengnsys_makecompress.sh index ff267b1e..6b09deb5 100755 --- a/installer/opengnsys_makecompress.sh +++ b/installer/opengnsys_makecompress.sh @@ -20,13 +20,13 @@ for PROG in jq unzip; do fi done -# Variables +# Variables. BRANCH="devel" CODE_URL="https://codeload.github.com/opengnsys/OpenGnsys/zip/$BRANCH" API_URL="https://api.github.com/repos/opengnsys/OpenGnsys/branches/$BRANCH" -REVISION=$(curl -s "$API_URL" | jq '"r" + (.commit.commit.committer.date | gsub("-"; "")[:8]) + "." + (.commit.sha[:7])') +REVISION=$(curl -s "$API_URL" | jq '"r" + (.commit.commit.committer.date | split("-") | join("")[:8]) + "." + (.commit.sha[:7])') -# Descargar repositorio SVN +# Descargar del repositorio de código. cd /tmp rm -fr opengnsys curl "$CODE_URL" -o opengnsys.zip && unzip opengnsys.zip && mv "OpenGnsys-$BRANCH" opengnsys diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 8b56b549..34ef4b18 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -1080,7 +1080,7 @@ function updateSummary() # Obtener revisión. if [ $REMOTE -eq 1 ]; then # Revisión: rAñoMesDía.Gitcommit (8 caracteres de fecha y 7 primeros de commit). - REVISION=$(curl -s "$API_URL" | jq '"r" + (.commit.commit.committer.date | gsub("-"; "")[:8]) + "." + (.commit.sha[:7])') + REVISION=$(curl -s "$API_URL" | jq '"r" + (.commit.commit.committer.date | split("-") | join("")[:8]) + "." + (.commit.sha[:7])') else # Parámetro "release" del fichero JSON. REVISION=$(jq -r '.release' $PROGRAMDIR/../doc/VERSION.json 2>/dev/null) |