RTL v0.13.0 update (#3293)

This commit is contained in:
openoms 2022-09-29 19:46:24 +01:00 committed by GitHub
parent 6aea40a58b
commit ec4d773c5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 75 additions and 48 deletions

View file

@ -3,7 +3,8 @@
## What's new in Version 1.8.1 of RaspiBlitz?
- New: Support of X708 UPS HAT [details](https://github.com/rootzoll/raspiblitz/pull/3087)
- Update: LND v0.15.1 [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.15.1-beta)
- Update: LND v0.15.1 [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.15.1-beta
- Update: RTL v0.13.0 with update option [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.12.3)
- Update: LNbits 0.9.2 [details](https://github.com/lnbits/lnbits-legend/releases/tag/0.9.2)
- Info: Run RaspiBlitz on Proxmox [details](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms/Proxmox)
- Update: Core Lightning v0.12.1 [details](https://github.com/ElementsProject/lightning/releases/tag/v0.12.1)

View file

@ -476,6 +476,10 @@ if [ "${bos}" == "on" ]; then
OPTIONS+=(BOS "Update Balance of Satoshis")
fi
if [ "${RTL}" == "on" ]||[ "${cRTL}" == "on" ]; then
OPTIONS+=(RTL "Update RTL")
fi
if [ "${thunderhub}" == "on" ]; then
OPTIONS+=(THUB "Update ThunderHub")
fi
@ -539,6 +543,9 @@ case $CHOICE in
BOS)
/home/admin/config.scripts/bonus.bos.sh update
;;
RTL)
/home/admin/config.scripts/bonus.rtl.sh update
;;
THUB)
/home/admin/config.scripts/bonus.thunderhub.sh update
;;

View file

@ -1,7 +1,7 @@
#!/bin/bash
# https://github.com/Ride-The-Lightning/RTL/releases
RTLVERSION="v0.12.3"
RTLVERSION="v0.13.0"
# check and load raspiblitz config
# to know which network is running
@ -15,6 +15,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
echo "# bonus.rtl.sh [on|off|menu] <lnd|cl> <mainnet|testnet|signet> <purge>"
echo "# bonus.rtl.sh connect-services"
echo "# bonus.rtl.sh prestart <lnd|cl> <mainnet|testnet|signet>"
echo "# bonus.rtl.sh update <commit>"
exit 1
fi
@ -180,7 +181,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# install
echo "# Running npm install ..."
export NG_CLI_ANALYTICS=false
sudo -u rtl npm install --only=prod --logLevel warn
sudo -u rtl npm install --omit=dev
if ! [ $? -eq 0 ]; then
echo "# FAIL - npm install did not run correctly - deleting code and exit"
sudo rm -r /home/rtl/RTL
@ -507,51 +508,69 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
exit 0
fi
# DEACTIVATED FOR NOW:
# - parameter scheme is conflicting with setting all prefixes etc
# - also just updating to latest has high change of breaking
#if [ "$1" = "update" ]; then
# echo "# UPDATING RTL"
# cd /home/rtl/RTL
# updateOption="$2"
# if [ ${#updateOption} -eq 0 ]; then
# # from https://github.com/apotdevin/thunderhub/blob/master/scripts/updateToLatest.sh
# # fetch latest master
# sudo -u rtl git fetch
# # unset $1
# set --
# UPSTREAM=${1:-'@{u}'}
# LOCAL=$(git rev-parse @)
# REMOTE=$(git rev-parse "$UPSTREAM")
# if [ $LOCAL = $REMOTE ]; then
# TAG=$(git tag | sort -V | tail -1)
# echo "# You are up-to-date on version" $TAG
# else
# echo "# Pulling latest changes..."
# sudo -u rtl git pull -p
# echo "# Reset to the latest release tag"
# TAG=$(git tag | sort -V | tail -1)
# sudo -u rtl git reset --hard $TAG
# echo "# updating to the latest"
# # https://github.com/Ride-The-Lightning/RTL#or-update-existing-dependencies
# sudo -u rtl npm install --only=prod
# echo "# Updated to version" $TAG
# fi
# elif [ "$updateOption" = "commit" ]; then
# echo "# updating to the latest commit in https://github.com/Ride-The-Lightning/RTL"
# sudo -u rtl git pull -p
# sudo -u rtl npm install --only=prod
# currentRTLcommit=$(cd /home/rtl/RTL; git describe --tags)
# echo "# Updated RTL to $currentRTLcommit"
# else
# echo "# Unknown option: $updateOption"
# fi
#
# echo
# echo "# Starting the RTL service ... "
# sudo systemctl start RTL
# exit 0
#fi
if [ "$1" = "update" ]; then
echo "# UPDATING RTL"
cd /home/rtl/RTL || exit 1
updateOption="$2"
if [ ${#updateOption} -eq 0 ]; then
# from https://github.com/apotdevin/thunderhub/blob/master/scripts/updateToLatest.sh
# fetch latest master
sudo -u rtl git fetch
# unset $1
set --
UPSTREAM=${1:-'@{u}'}
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse "$UPSTREAM")
if [ $LOCAL = $REMOTE ]; then
TAG=$(git tag | sort -V | grep -v rc | tail -1)
echo "# You are up-to-date on version" $TAG
else
echo "# Pulling latest changes..."
sudo -u rtl git pull -p
echo "# Reset to the latest release tag"
TAG=$(git tag | sort -V | grep -v rc | tail -1)
sudo -u rtl git reset --hard $TAG
echo "# updating to the latest"
# https://github.com/Ride-The-Lightning/RTL#or-update-existing-dependencies
echo "# Running npm install ..."
export NG_CLI_ANALYTICS=false
sudo -u rtl npm install --omit=dev
if ! [ $? -eq 0 ]; then
echo "# FAIL - npm install did not run correctly - deleting code and exit"
sudo rm -r /home/rtl/RTL
exit 1
else
echo "# OK - RTL install looks good"
echo
fi
echo "# Updated to version" $TAG
fi
elif [ "$updateOption" = "commit" ]; then
echo "# updating to the latest commit in https://github.com/Ride-The-Lightning/RTL"
sudo -u rtl git pull -p
echo "# Running npm install ..."
export NG_CLI_ANALYTICS=false
sudo -u rtl npm install --only=prod --logLevel warn
if ! [ $? -eq 0 ]; then
echo "# FAIL - npm install did not run correctly - deleting code and exit"
sudo rm -r /home/rtl/RTL
exit 1
else
echo "# OK - RTL install looks good"
echo
fi
currentRTLcommit=$(cd /home/rtl/RTL; git describe --tags)
echo "# Updated RTL to $currentRTLcommit"
else
echo "# Unknown option: $updateOption"
fi
echo
echo "# Starting the ${systemdService} service ... "
sudo systemctl restart ${systemdService}
exit 0
fi
echo "# FAIL - Unknown Parameter $1"
echo "# may need reboot to run normal again"