diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2018-06-05 12:36:47 +0200 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2018-06-05 12:36:47 +0200 |
commit | 832e27bbe8a82ad46ba2d3ea9550728751e79b99 (patch) | |
tree | e667e13b704229a3c811f1b8d5da8d39fac45884 /installer/opengnsys_update.sh | |
parent | 228dd16463fb5e095869246963808ff9b9a40de9 (diff) |
#840: Adaptar valor de revisión según fecha y parte del commit de Git en instalador y actualizador; continuar sustituyendo URLs de Git.
Diffstat (limited to 'installer/opengnsys_update.sh')
-rwxr-xr-x | installer/opengnsys_update.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 63512336..f8689673 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -1029,10 +1029,11 @@ function updateSummary() # Actualizar fichero de versión y revisión. local VERSIONFILE REVISION VERSIONFILE="$INSTALL_TARGET/doc/VERSION.txt" - REVISION=$(curl -s "$API_URL" | jq -r ".commit.commit.committer.date" | awk '{gsub(/[^0-9]/,""); print}') + # Revisión: rAñoMesDía.Gitcommit (8 caracteres de fecha y 7 primeros de commit). + REVISION=$(curl -s "$API_URL" | jq -r '"r" + (.commit.commit.committer.date | gsub("-"; "")[:8]) + "." + (.commit.sha[:7])') [ -f $VERSIONFILE ] || echo "OpenGnsys" >$VERSIONFILE - perl -pi -e "s/($| r[0-9]*)/ $REVISION/" $VERSIONFILE + sed -ri "s/($| r[.0-9a-f]+)/ $REVISION/" $VERSIONFILE echo echoAndLog "OpenGnsys Update Summary" |