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 | |
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')
-rwxr-xr-x | installer/opengnsys_installer.sh | 9 | ||||
-rwxr-xr-x | installer/opengnsys_makecompress.sh | 4 | ||||
-rwxr-xr-x | installer/opengnsys_update.sh | 5 | ||||
-rw-r--r-- | installer/vagrant/Vagrantfile-boottools-vbox | 2 | ||||
-rw-r--r-- | installer/vagrant/Vagrantfile-browser-vbox | 2 |
5 files changed, 13 insertions, 9 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index a9c54f0f..7d41bd6b 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1553,14 +1553,17 @@ EOT function installationSummary() { + local VERSIONFILE REVISION + # Crear fichero de versión y revisión, si no existe. - local VERSIONFILE="$INSTALL_TARGET/doc/VERSION.txt" + VERSIONFILE="$INSTALL_TARGET/doc/VERSION.txt" [ -f $VERSIONFILE ] || echo "OpenGnsys Server" >$VERSIONFILE # Incluir datos de revisión, si se está instaladno desde el repositorio # de código o si no está incluida en el fichero de versión. if [ $REMOTE -eq 1 ] || [ -z "$(awk '$3~/r[0-9]*/ {print}' $VERSIONFILE)" ]; then - local REVISION=$(curl -s "$API_URL" | jq -r ".commit.commit.committer.date" | awk '{gsub(/[^0-9]/,""); print}') - sed -ri "s/($| r[0-9]*)/ $REVISION/" $VERSIONFILE + # 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])') + sed -ri "s/($| r[.0-9a-f]+)/ $REVISION/" $VERSIONFILE fi # Mostrar información. diff --git a/installer/opengnsys_makecompress.sh b/installer/opengnsys_makecompress.sh index 0fbec746..5c8aa729 100755 --- a/installer/opengnsys_makecompress.sh +++ b/installer/opengnsys_makecompress.sh @@ -24,7 +24,7 @@ done 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" | awk '{gsub(/[^0-9]/,""); print}') +REVISION=$(curl -s "$API_URL" | jq -r '"r" + (.commit.commit.committer.date | gsub("-"; "")[:8]) + "." + (.commit.sha[:7])') # Descargar repositorio SVN cd /tmp @@ -36,7 +36,7 @@ chown -R root.root opengnsys WARNING=$? # Parchear datos de revisión del código. -perl -pi -e "s/$/ $REVISION/" opengnsys/doc/VERSION.txt +sed -ri "s/$/ $REVISION/" opengnsys/doc/VERSION.txt # Generar fichero comprimido. VERSION=$(awk '{print $2"-"$3}' opengnsys/doc/VERSION.txt) 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" diff --git a/installer/vagrant/Vagrantfile-boottools-vbox b/installer/vagrant/Vagrantfile-boottools-vbox index 1a7c9e5a..83348f02 100644 --- a/installer/vagrant/Vagrantfile-boottools-vbox +++ b/installer/vagrant/Vagrantfile-boottools-vbox @@ -24,7 +24,7 @@ apt-get install -y subversion groupadd opengnsys mkdir -p /opt/opengnsys/client /tmp/opengnsys_installer/opengnsys ln -fs /var/lib/tftpboot /opt/opengnsys -svn export https://opengnsys.es/svn/branches/version1.1/client /tmp/opengnsys_installer/opengnsys/client +svn export https://github.com/opengnsys/OpenGnsys/branches/devel/client /tmp/opengnsys_installer/opengnsys/client echo "Connect to this VM, launch boot-tools generation script and follow instructions:" echo " sudo /tmp/opengnsys_installer/opengnsys/client/boot-tools/boottoolsgenerator.sh" echo "Warning: this process may take a long time." diff --git a/installer/vagrant/Vagrantfile-browser-vbox b/installer/vagrant/Vagrantfile-browser-vbox index 9cf3661c..bc8d55d4 100644 --- a/installer/vagrant/Vagrantfile-browser-vbox +++ b/installer/vagrant/Vagrantfile-browser-vbox @@ -29,7 +29,7 @@ echo "yes" | ./configure -opensource -embedded x86 -webkit -openssl -qt-gfx-vnc make make install # Compile Browser. -svn export https://opengnsys.es/svn/branches/version1.1/client/browser ../browser +svn export https://github.com/opengnsys/OpenGnsys/branches/devel/client/browser ../browser cd browser qmake browser.pro make |