mirror of
https://github.com/Retropex/raspiblitz.git
synced 2025-05-12 19:20:48 +02:00
* #4802 replace rc with release commit hash
This commit is contained in:
parent
43a2ac5bab
commit
538f0c34fd
@ -307,7 +307,7 @@ Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/
|
|||||||
#### Clean and shutdown the build machine
|
#### Clean and shutdown the build machine
|
||||||
* run the command (same as running `release` under `admin`):
|
* run the command (same as running `release` under `admin`):
|
||||||
```bash
|
```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.
|
* This will shut down the laptop.
|
||||||
* Remove the `Installation medium` and the `Ubuntu Live` USB stick and the LAN cable
|
* Remove the `Installation medium` and the `Ubuntu Live` USB stick and the LAN cable
|
||||||
|
@ -645,7 +645,7 @@ echo "bitcoin:raspiblitz" | chpasswd
|
|||||||
chmod 755 /home/bitcoin
|
chmod 755 /home/bitcoin
|
||||||
|
|
||||||
# WRITE BASIC raspiblitz.info to sdcard
|
# 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
|
touch /home/admin/raspiblitz.info
|
||||||
echo "baseimage=${baseimage}" | tee raspiblitz.info
|
echo "baseimage=${baseimage}" | tee raspiblitz.info
|
||||||
echo "cpu=${cpu}" | tee -a raspiblitz.info
|
echo "cpu=${cpu}" | tee -a raspiblitz.info
|
||||||
|
@ -9,6 +9,8 @@ source <(/home/admin/_cache.sh get \
|
|||||||
chain \
|
chain \
|
||||||
lightning \
|
lightning \
|
||||||
codeVersion \
|
codeVersion \
|
||||||
|
codeRelease \
|
||||||
|
codeCommit \
|
||||||
hostname \
|
hostname \
|
||||||
undervoltageReports \
|
undervoltageReports \
|
||||||
hdd_used_info \
|
hdd_used_info \
|
||||||
@ -347,7 +349,7 @@ ${color_yellow} ${color_gray}${ln_channelInfo} ${ln_peersInfo}
|
|||||||
${color_yellow} ${color_gray}${ln_feeReport}
|
${color_yellow} ${color_gray}${ln_feeReport}
|
||||||
$lastLine
|
$lastLine
|
||||||
" \
|
" \
|
||||||
"RaspiBlitz v${codeVersion}" \
|
"RaspiBlitz ${codeVersion}-${codeRelease}" \
|
||||||
"-------------------------------------------" \
|
"-------------------------------------------" \
|
||||||
"Refreshed: ${datetime}" \
|
"Refreshed: ${datetime}" \
|
||||||
"CPU load${system_cpu_load##up*, }" \
|
"CPU load${system_cpu_load##up*, }" \
|
||||||
|
@ -170,6 +170,10 @@ do
|
|||||||
/home/admin/_cache.sh set system_count_undervoltage "${countReports}"
|
/home/admin/_cache.sh set system_count_undervoltage "${countReports}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# update code commit
|
||||||
|
codeCommit=$(git -C /home/admin/raspiblitz rev-parse --short HEAD)
|
||||||
|
/home/admin/_cache.sh set codeCommit "${codeCommit}"
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# TOR
|
# TOR
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@ function check() {
|
|||||||
|
|
||||||
# command: release
|
# command: release
|
||||||
function release() {
|
function release() {
|
||||||
|
firstPARAM=$1
|
||||||
echo "Command to prepare your RaspiBlitz installation for sd card image:"
|
echo "Command to prepare your RaspiBlitz installation for sd card image:"
|
||||||
echo "- delete logs"
|
echo "- delete logs"
|
||||||
echo "- clean raspiblitz.info"
|
echo "- clean raspiblitz.info"
|
||||||
@ -151,7 +152,7 @@ function release() {
|
|||||||
echo "- shutdown"
|
echo "- shutdown"
|
||||||
confirmMsg release
|
confirmMsg release
|
||||||
if [ $confirm -eq 1 ]; then
|
if [ $confirm -eq 1 ]; then
|
||||||
/home/admin/config.scripts/blitz.preparerelease.sh $1
|
/home/admin/config.scripts/blitz.release.sh $firstPARAM
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
# RaspiBlitz Version - always [major].[main].[sub] (sub can be a string like '2rc1')
|
# 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
|
# keep last line with comment ---> IF YOU HAVE A NEW VERSION BRANCH > EDIT ALSO build_sdcard.sh
|
@ -57,6 +57,7 @@ fi
|
|||||||
|
|
||||||
# load code software version
|
# load code software version
|
||||||
source /home/admin/_version.info
|
source /home/admin/_version.info
|
||||||
|
codeCommit=$(git -C /home/admin/raspiblitz rev-parse --short HEAD)
|
||||||
|
|
||||||
## get basic info (its OK if not set yet)
|
## get basic info (its OK if not set yet)
|
||||||
source /home/admin/raspiblitz.info 2>/dev/null
|
source /home/admin/raspiblitz.info 2>/dev/null
|
||||||
@ -84,6 +85,8 @@ echo "***************************************************************"
|
|||||||
echo "* RASPIBLITZ DEBUG LOGS "
|
echo "* RASPIBLITZ DEBUG LOGS "
|
||||||
echo "***************************************************************"
|
echo "***************************************************************"
|
||||||
echo "blitzversion: ${codeVersion}"
|
echo "blitzversion: ${codeVersion}"
|
||||||
|
echo "commit-release: ${codeRelease}"
|
||||||
|
echo "commit-active: ${codeCommit}"
|
||||||
echo "chainnetwork: ${network} / ${chain}"
|
echo "chainnetwork: ${network} / ${chain}"
|
||||||
uptime
|
uptime
|
||||||
echo
|
echo
|
||||||
|
@ -18,10 +18,10 @@ elif [ -d /boot ]; then
|
|||||||
fi
|
fi
|
||||||
echo "# raspi_bootdir(${raspi_bootdir})"
|
echo "# raspi_bootdir(${raspi_bootdir})"
|
||||||
|
|
||||||
# determine if this is a release candidate (use file not cache)
|
# determine if this is a early release candidate (use file not cache)
|
||||||
codeVersion=$(cat /home/admin/_version.info | grep 'codeVersion="' | cut -d'"' -f2)
|
codeVersion=$(git -C /home/admin/raspiblitz branch --show-current)
|
||||||
isReleaseCandidate=0
|
isReleaseCandidate=0
|
||||||
if [[ "$codeVersion" == *"rc"* ]]; then
|
if [[ "$codeVersion" == *"dev"* ]]; then
|
||||||
isReleaseCandidate=1
|
isReleaseCandidate=1
|
||||||
fi
|
fi
|
||||||
echo "# isReleaseCandidate(${isReleaseCandidate})"
|
echo "# isReleaseCandidate(${isReleaseCandidate})"
|
||||||
|
@ -13,6 +13,13 @@ elif [ -d /boot ]; then
|
|||||||
fi
|
fi
|
||||||
echo "# raspi_bootdir(${raspi_bootdir})"
|
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
|
# stop background services
|
||||||
sudo systemctl stop background.service
|
sudo systemctl stop background.service
|
||||||
sudo systemctl stop background.scan.service
|
sudo systemctl stop background.scan.service
|
@ -175,12 +175,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
sudo cp /home/admin/raspiblitz/build_sdcard.sh /home/admin/build_sdcard.sh
|
sudo cp /home/admin/raspiblitz/build_sdcard.sh /home/admin/build_sdcard.sh
|
||||||
sudo chmod +x /home/admin/build_sdcard.sh 2>/dev/null
|
sudo chmod +x /home/admin/build_sdcard.sh 2>/dev/null
|
||||||
source <(sudo /home/admin/build_sdcard.sh -EXPORT)
|
source <(sudo /home/admin/build_sdcard.sh -EXPORT)
|
||||||
echo "# activeBranch detected by build_sdcard.sh: ${activeBranch}"
|
|
||||||
GITHUB_USER="${defaultAPIuser}"
|
GITHUB_USER="${defaultAPIuser}"
|
||||||
GITHUB_REPO="${defaultAPIrepo}"
|
GITHUB_REPO="${defaultAPIrepo}"
|
||||||
# use dev branch when its an Release Candidate
|
activeBranch=$(git -C /home/admin/raspiblitz branch --show-current)
|
||||||
source <(/home/admin/_cache.sh get codeVersion)
|
echo "# activeBranch detected by raspiblitz repo: ${activeBranch}"
|
||||||
if [[ "$codeVersion" == *"rc"* ]]; then
|
if [[ "$activeBranch" == *"dev"* ]]; then
|
||||||
echo "# RELEASE CANDIDATE: using dev branch"
|
echo "# RELEASE CANDIDATE: using dev branch"
|
||||||
GITHUB_BRANCH="dev"
|
GITHUB_BRANCH="dev"
|
||||||
else
|
else
|
||||||
|
@ -53,10 +53,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
source <(sudo /home/admin/build_sdcard.sh -EXPORT)
|
source <(sudo /home/admin/build_sdcard.sh -EXPORT)
|
||||||
GITHUB_USER="${defaultWEBUIuser}"
|
GITHUB_USER="${defaultWEBUIuser}"
|
||||||
GITHUB_REPO="${defaultWEBUIrepo}"
|
GITHUB_REPO="${defaultWEBUIrepo}"
|
||||||
|
activeBranch=$(git -C /home/admin/raspiblitz branch --show-current)
|
||||||
# use master branch when its an Release Candidate
|
echo "# activeBranch detected by raspiblitz repo: ${activeBranch}"
|
||||||
source <(/home/admin/_cache.sh get codeVersion)
|
# use dev branch when raspiblitz repo is n dev branch
|
||||||
if [[ "$codeVersion" == *"rc"* ]]; then
|
if [[ "$activeBranch" == *"dev"* ]]; then
|
||||||
echo "# RELEASE CANDIDATE: using master branch"
|
echo "# RELEASE CANDIDATE: using master branch"
|
||||||
GITHUB_BRANCH="master"
|
GITHUB_BRANCH="master"
|
||||||
else
|
else
|
||||||
|
@ -21,7 +21,7 @@ OPTIONS+=(SHUTDOWN "Shutdown without Changes")
|
|||||||
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
|
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
|
||||||
HEIGHT=$(($CHOICE_HEIGHT+8))
|
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
|
case $CHOICE in
|
||||||
FRESHSETUP)
|
FRESHSETUP)
|
||||||
|
@ -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.
|
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.
|
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.
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ fi
|
|||||||
source <(/home/admin/_cache.sh get \
|
source <(/home/admin/_cache.sh get \
|
||||||
internet_localip \
|
internet_localip \
|
||||||
codeVersion \
|
codeVersion \
|
||||||
|
codeRelease \
|
||||||
system_temp_celsius \
|
system_temp_celsius \
|
||||||
system_temp_fahrenheit \
|
system_temp_fahrenheit \
|
||||||
hostname \
|
hostname \
|
||||||
@ -109,4 +110,4 @@ if [ "${vm}" == "0" ]; then
|
|||||||
else
|
else
|
||||||
temp_info="VM"
|
temp_info="VM"
|
||||||
fi
|
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}
|
@ -6,7 +6,7 @@
|
|||||||
source /home/admin/raspiblitz.info 2>/dev/null
|
source /home/admin/raspiblitz.info 2>/dev/null
|
||||||
|
|
||||||
# get values from cache
|
# 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
|
# 1st PARAMETER: eventID
|
||||||
# fixed ID string for a certain event
|
# fixed ID string for a certain event
|
||||||
@ -40,7 +40,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# default backtitle for dialog
|
# 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
|
# 1) WELL DEFINED EVENTS
|
||||||
|
Loading…
Reference in New Issue
Block a user