From 06115bd77ef1a7f6cd6b52cc9d9f7f1f2210b873 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Fri, 5 Jun 2020 03:54:15 +0200 Subject: [PATCH] uncomment the helper-update-version.sh --- helper-update-version.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/helper-update-version.sh b/helper-update-version.sh index 089c11f..cc78f4e 100755 --- a/helper-update-version.sh +++ b/helper-update-version.sh @@ -1,16 +1,16 @@ -#!/bin/bash +!/bin/bash # Retrieve sources, get sha256sum, parse package version and update these strings in manifest, README and /conf/app.src -# URL=$(curl -s https://api.github.com/repos/duniter/cesium/releases/latest | grep "browser_" | grep "web" | head -1 | cut -d\" -f4) -# wget -nc --quiet $URL -P ./tmp -# CHECKSUM=$(sha256sum ./tmp/cesium-*-web.zip | head -c 64) -# sed -i "s/SOURCE_SUM=.*/SOURCE_SUM=${CHECKSUM}/" ./conf/app.src -# sed -i "s#SOURCE_URL=.*#SOURCE_URL=$URL#" ./conf/app.src +URL=$(curl -s https://api.github.com/repos/duniter/cesium/releases/latest | grep "browser_" | grep "web" | head -1 | cut -d\" -f4) +wget -nc --quiet $URL -P ./tmp +CHECKSUM=$(sha256sum ./tmp/cesium-*-web.zip | head -c 64) +sed -i "s/SOURCE_SUM=.*/SOURCE_SUM=${CHECKSUM}/" ./conf/app.src +sed -i "s#SOURCE_URL=.*#SOURCE_URL=$URL#" ./conf/app.src -# VERSION=$(echo $URL | sed "s#https://github.com/duniter/cesium/releases/download/\(.*\)/cesium.*#\1#") -# sed -i "s#\*\*Shipped version:\*\*.*#\*\*Shipped version:\*\* ${VERSION}#" ./README.md -# sed -i "s# \"version\": \".*# \"version\": \"${VERSION}\~ynh1\",#" ./manifest.json +VERSION=$(echo $URL | sed "s#https://github.com/duniter/cesium/releases/download/\(.*\)/cesium.*#\1#") +sed -i "s#\*\*Shipped version:\*\*.*#\*\*Shipped version:\*\* ${VERSION}#" ./README.md +sed -i "s# \"version\": \".*# \"version\": \"${VERSION}\~ynh1\",#" ./manifest.json -# rm -f -R ./tmp +rm -f -R ./tmp -# git commit README.md manifest.json conf/app.src -m "$VERSION" +git commit README.md manifest.json conf/app.src -m "$VERSION"