#4802 replace rc with release commit hash (#4803)

* #4802 replace rc with release commit hash
This commit is contained in:
/rootzoll 2024-10-16 22:06:42 +02:00 committed by GitHub
parent 43a2ac5bab
commit 538f0c34fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 39 additions and 21 deletions

View File

@ -307,7 +307,7 @@ Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/
#### Clean and shutdown the build machine
* run the command (same as running `release` under `admin`):
```bash
sudo -u admin /home/admin/config.scripts/blitz.preparerelease.sh
sudo -u admin /home/admin/config.scripts/blitz.release.sh
```
* This will shut down the laptop.
* Remove the `Installation medium` and the `Ubuntu Live` USB stick and the LAN cable

View File

@ -645,7 +645,7 @@ echo "bitcoin:raspiblitz" | chpasswd
chmod 755 /home/bitcoin
# WRITE BASIC raspiblitz.info to sdcard
# if further info gets added .. make sure to keep that on: blitz.preparerelease.sh
# if further info gets added .. make sure to keep that on: blitz.rerelease.sh
touch /home/admin/raspiblitz.info
echo "baseimage=${baseimage}" | tee raspiblitz.info
echo "cpu=${cpu}" | tee -a raspiblitz.info

View File

@ -9,6 +9,8 @@ source <(/home/admin/_cache.sh get \
chain \
lightning \
codeVersion \
codeRelease \
codeCommit \
hostname \
undervoltageReports \
hdd_used_info \
@ -347,7 +349,7 @@ ${color_yellow} ${color_gray}${ln_channelInfo} ${ln_peersInfo}
${color_yellow} ${color_gray}${ln_feeReport}
$lastLine
" \
"RaspiBlitz v${codeVersion}" \
"RaspiBlitz ${codeVersion}-${codeRelease}" \
"-------------------------------------------" \
"Refreshed: ${datetime}" \
"CPU load${system_cpu_load##up*, }" \

View File

@ -170,6 +170,10 @@ do
/home/admin/_cache.sh set system_count_undervoltage "${countReports}"
fi
# update code commit
codeCommit=$(git -C /home/admin/raspiblitz rev-parse --short HEAD)
/home/admin/_cache.sh set codeCommit "${codeCommit}"
#################
# TOR

View File

@ -141,6 +141,7 @@ function check() {
# command: release
function release() {
firstPARAM=$1
echo "Command to prepare your RaspiBlitz installation for sd card image:"
echo "- delete logs"
echo "- clean raspiblitz.info"
@ -151,7 +152,7 @@ function release() {
echo "- shutdown"
confirmMsg release
if [ $confirm -eq 1 ]; then
/home/admin/config.scripts/blitz.preparerelease.sh $1
/home/admin/config.scripts/blitz.release.sh $firstPARAM
fi
}

View File

@ -1,3 +1,4 @@
# RaspiBlitz Version - always [major].[main].[sub] (sub can be a string like '2rc1')
codeVersion="1.11.3rc2"
codeVersion="1.11.3"
codeRelease="dev"
# keep last line with comment ---> IF YOU HAVE A NEW VERSION BRANCH > EDIT ALSO build_sdcard.sh

View File

@ -57,6 +57,7 @@ fi
# load code software version
source /home/admin/_version.info
codeCommit=$(git -C /home/admin/raspiblitz rev-parse --short HEAD)
## get basic info (its OK if not set yet)
source /home/admin/raspiblitz.info 2>/dev/null
@ -84,6 +85,8 @@ echo "***************************************************************"
echo "* RASPIBLITZ DEBUG LOGS "
echo "***************************************************************"
echo "blitzversion: ${codeVersion}"
echo "commit-release: ${codeRelease}"
echo "commit-active: ${codeCommit}"
echo "chainnetwork: ${network} / ${chain}"
uptime
echo

View File

@ -18,10 +18,10 @@ elif [ -d /boot ]; then
fi
echo "# raspi_bootdir(${raspi_bootdir})"
# determine if this is a release candidate (use file not cache)
codeVersion=$(cat /home/admin/_version.info | grep 'codeVersion="' | cut -d'"' -f2)
# determine if this is a early release candidate (use file not cache)
codeVersion=$(git -C /home/admin/raspiblitz branch --show-current)
isReleaseCandidate=0
if [[ "$codeVersion" == *"rc"* ]]; then
if [[ "$codeVersion" == *"dev"* ]]; then
isReleaseCandidate=1
fi
echo "# isReleaseCandidate(${isReleaseCandidate})"

View File

@ -13,6 +13,13 @@ elif [ -d /boot ]; then
fi
echo "# raspi_bootdir(${raspi_bootdir})"
# write release info to to version file
echo "writing codeRelease commit ro version file:"
releaseCommit=$(git -C /home/admin/raspiblitz rev-parse --short HEAD)
sed -i 's/^codeRelease=".*"/codeRelease="${releaseCommit}"/' /home/admin/_version.info
cat /home/admin/_version.info
echo
# stop background services
sudo systemctl stop background.service
sudo systemctl stop background.scan.service

View File

@ -175,12 +175,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo cp /home/admin/raspiblitz/build_sdcard.sh /home/admin/build_sdcard.sh
sudo chmod +x /home/admin/build_sdcard.sh 2>/dev/null
source <(sudo /home/admin/build_sdcard.sh -EXPORT)
echo "# activeBranch detected by build_sdcard.sh: ${activeBranch}"
GITHUB_USER="${defaultAPIuser}"
GITHUB_REPO="${defaultAPIrepo}"
# use dev branch when its an Release Candidate
source <(/home/admin/_cache.sh get codeVersion)
if [[ "$codeVersion" == *"rc"* ]]; then
activeBranch=$(git -C /home/admin/raspiblitz branch --show-current)
echo "# activeBranch detected by raspiblitz repo: ${activeBranch}"
if [[ "$activeBranch" == *"dev"* ]]; then
echo "# RELEASE CANDIDATE: using dev branch"
GITHUB_BRANCH="dev"
else

View File

@ -53,10 +53,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
source <(sudo /home/admin/build_sdcard.sh -EXPORT)
GITHUB_USER="${defaultWEBUIuser}"
GITHUB_REPO="${defaultWEBUIrepo}"
# use master branch when its an Release Candidate
source <(/home/admin/_cache.sh get codeVersion)
if [[ "$codeVersion" == *"rc"* ]]; then
activeBranch=$(git -C /home/admin/raspiblitz branch --show-current)
echo "# activeBranch detected by raspiblitz repo: ${activeBranch}"
# use dev branch when raspiblitz repo is n dev branch
if [[ "$activeBranch" == *"dev"* ]]; then
echo "# RELEASE CANDIDATE: using master branch"
GITHUB_BRANCH="master"
else

View File

@ -21,7 +21,7 @@ OPTIONS+=(SHUTDOWN "Shutdown without Changes")
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
HEIGHT=$(($CHOICE_HEIGHT+8))
CHOICE=$(dialog --clear --backtitle "RaspiBlitz ${codeVersion} - Setup" --title "⚡ Welcome to your RaspiBlitz ⚡" --menu "\nChoose how you want to setup your RaspiBlitz: \n " ${HEIGHT} 64 ${CHOICE_HEIGHT} "${OPTIONS[@]}" 2>&1 >/dev/tty)
CHOICE=$(dialog --clear --backtitle "RaspiBlitz ${codeVersion}-${codeRelease} - Setup" --title "⚡ Welcome to your RaspiBlitz ⚡" --menu "\nChoose how you want to setup your RaspiBlitz: \n " ${HEIGHT} 64 ${CHOICE_HEIGHT} "${OPTIONS[@]}" 2>&1 >/dev/tty)
case $CHOICE in
FRESHSETUP)

View File

@ -7,7 +7,7 @@ source /home/admin/raspiblitz.info
whiptail --title " RASPIBLITZ UPDATE " --yes-button "Start Update" --no-button "Other Options" --yesno "We found data from an old RaspiBlitz on your HDD/SSD.
You can start now the UPDATE to version ${codeVersion}.
You can start now the UPDATE to version ${codeVersion}-${codeRelease}.
You will need to set a new Password A for the SSH login. All your channels will stay open and other passwords will stay the same.

View File

@ -88,6 +88,7 @@ fi
source <(/home/admin/_cache.sh get \
internet_localip \
codeVersion \
codeRelease \
system_temp_celsius \
system_temp_fahrenheit \
hostname \
@ -109,4 +110,4 @@ if [ "${vm}" == "0" ]; then
else
temp_info="VM"
fi
dialog --title " Node is Syncing (${time}) " --backtitle "${codeVersion} / ${internet_localip} ${temp_info} / ${hdd_used_info}" --infobox "${infoStr}\n ${adminStr}" ${height} ${width}
dialog --title " Node is Syncing (${time}) " --backtitle "${codeVersion}-${codeRelease} ${internet_localip} ${temp_info} ${hdd_used_info}" --infobox "${infoStr}\n ${adminStr}" ${height} ${width}

View File

@ -6,7 +6,7 @@
source /home/admin/raspiblitz.info 2>/dev/null
# get values from cache
source <(/home/admin/_cache.sh get codeVersion internet_localip blitzapi hdd_used_info system_temp_celsius)
source <(/home/admin/_cache.sh get codeVersion codeRelease internet_localip blitzapi hdd_used_info system_temp_celsius)
# 1st PARAMETER: eventID
# fixed ID string for a certain event
@ -40,7 +40,7 @@ else
fi
# default backtitle for dialog
backtitle="${codeVersion} ${eventID} / ${internet_localip} ${temp_info} ${hdd_used_info}"
backtitle="${codeVersion}-${codeRelease} ${eventID} ${internet_localip} ${temp_info} ${hdd_used_info}"
################################################
# 1) WELL DEFINED EVENTS