From fea889ea00640f6d4e0958065fa43c85aeb2ad6c Mon Sep 17 00:00:00 2001
From: Benoit Lavenier <benoit.lavenier@e-is.pro>
Date: Fri, 12 May 2023 19:39:04 +0200
Subject: [PATCH] Fix release github script

---
 scripts/release-to-github.sh         | 2 +-
 www/js/services/settings-services.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/release-to-github.sh b/scripts/release-to-github.sh
index 40f3d1f44..1cf6bafac 100755
--- a/scripts/release-to-github.sh
+++ b/scripts/release-to-github.sh
@@ -151,7 +151,7 @@ if [[ -f "${WEB_EXT_XPI_FILE}" ]]; then
   browser_download_url=$(echo "$result" | grep -P "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "\"browser_download_url\":[ ]?\"[^\"]+"  | grep -oP "https://[A-Za-z0-9/.-]+")
   WEB_EXT_XPI_SHA256=$(cd ${DIST_WEB} && sha256sum "${WEB_EXT_XPI_BASENAME}")
   echo " - ${browser_download_url}  | Checksum: ${WEB_EXT_XPI_SHA256}"
-  echo "${WEB_EXT_XPI_SHA256}  ${WEB_EXT_XPI_BASENAME}" > "${WEB_EXT_XPI_BASENAME}.sha256"
+  echo "${WEB_EXT_XPI_SHA256}  ${WEB_EXT_XPI_BASENAME}" > "${WEB_EXT_XPI_FILE}.sha256"
   result=$(curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: text/plain' -T "${WEB_EXT_XPI_FILE}.sha256" "${upload_url}?name=${WEB_EXT_XPI_BASENAME}.sha256")
 else
   echo " - ERROR: Web signed extension artifact (XPI) not found! Skipping."
diff --git a/www/js/services/settings-services.js b/www/js/services/settings-services.js
index 4e1c14037..e0854cde9 100644
--- a/www/js/services/settings-services.js
+++ b/www/js/services/settings-services.js
@@ -233,7 +233,7 @@ angular.module('cesium.settings.services', ['ngApi', 'cesium.config'])
     });
 
     // If need select a random peer, from the config
-    if (!newData.node && _.size(csConfig.fallbackNodes) > 0) {
+    if (!data.node && !newData.node && _.size(csConfig.fallbackNodes) > 0) {
       newData.node = _.sample(csConfig.fallbackNodes);
       console.info('[settings] Random selected peer: [{0}:{1}]'.format(newData.node.host, newData.node.port||80));
       newData.node.temporary = true;
-- 
GitLab