From 832e27bbe8a82ad46ba2d3ea9550728751e79b99 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 5 Jun 2018 12:36:47 +0200 Subject: #840: Adaptar valor de revisión según fecha y parte del commit de Git en instalador y actualizador; continuar sustituyendo URLs de Git. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/opengnsys_makecompress.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'installer/opengnsys_makecompress.sh') 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) -- cgit v1.2.3-18-g5258