mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-04 12:05:04 +02:00
Merge remote-tracking branch 'origin/v1.6' into dev
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
*Build your own Lightning Node on a RaspberryPi with a nice Display.*
|
*Build your own Lightning Node on a RaspberryPi with a nice Display.*
|
||||||
|
|
||||||
`Version 1.6 with lnd 0.10.4 and bitcoin 0.20.1 (or litecoin 0.18.1)`
|
`Version 1.6 with lnd 0.10.4 and bitcoin 0.20.0 (or litecoin 0.18.1)`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@@ -125,10 +125,11 @@ patch()
|
|||||||
# Patch Options
|
# Patch Options
|
||||||
OPTIONS=(PATCH "Patch/Sync RaspiBlitz with GitHub Repo" \
|
OPTIONS=(PATCH "Patch/Sync RaspiBlitz with GitHub Repo" \
|
||||||
REPO "Change GitHub Repo to sync with" \
|
REPO "Change GitHub Repo to sync with" \
|
||||||
BRANCH "Change GitHub Branch to sync with"
|
BRANCH "Change GitHub Branch to sync with" \
|
||||||
|
PR "Checkout a PullRequest to test"
|
||||||
)
|
)
|
||||||
|
|
||||||
CHOICE=$(whiptail --clear --title "GitHub-User: ${activeGitHubUser} Branch: ${activeBranch}" --menu "" 10 55 3 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
CHOICE=$(whiptail --clear --title "GitHub-User: ${activeGitHubUser} Branch: ${activeBranch}" --menu "" 11 55 4 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||||
|
|
||||||
clear
|
clear
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
@@ -185,6 +186,24 @@ patch()
|
|||||||
patch
|
patch
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
PR)
|
||||||
|
clear
|
||||||
|
echo "..."
|
||||||
|
pullRequestID=$(whiptail --inputbox "\nPlease enter the NUMBER of the PullRequest on RaspiBlitz Repo '${activeGitHubUser}'?" 10 46 --title "Checkout PullRequest ID" 3>&1 1>&2 2>&3)
|
||||||
|
exitstatus=$?
|
||||||
|
if [ $exitstatus = 0 ]; then
|
||||||
|
pullRequestID=$(echo "${pullRequestID}" | cut -d " " -f1)
|
||||||
|
echo "--> " $pullRequestID
|
||||||
|
cd /home/admin/raspiblitz
|
||||||
|
git fetch origin pull/${pullRequestID}/head:${pullRequestID}pr
|
||||||
|
error=""
|
||||||
|
source <(sudo -u admin /home/admin/XXsyncScripts.sh ${pullRequestID}pr)
|
||||||
|
if [ ${#error} -gt 0 ]; then
|
||||||
|
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -83,17 +83,17 @@ if [ ${#wantedBranch} -gt 0 ]; then
|
|||||||
echo "# OK"
|
echo "# OK"
|
||||||
else
|
else
|
||||||
|
|
||||||
|
echo "# checking if branch is locally available"
|
||||||
|
localBranch=$(git branch | grep -c "${wantedBranch}")
|
||||||
|
if [ ${localBranch} -eq 0 ]; then
|
||||||
echo "# checking branch exists .."
|
echo "# checking branch exists .."
|
||||||
branchExists=$(curl -s https://api.github.com/repos/${activeGitHubUser}/raspiblitz/branches/${wantedBranch} | jq -r '.name' | grep -c ${wantedBranch})
|
branchExists=$(curl -s https://api.github.com/repos/${activeGitHubUser}/raspiblitz/branches/${wantedBranch} | jq -r '.name' | grep -c ${wantedBranch})
|
||||||
if [ ${branchExists} -eq 0 ]; then
|
if [ ${branchExists} -eq 0 ]; then
|
||||||
echo "error='branch not found'"
|
echo "error='branch not found'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "# checking if branch is locally available"
|
|
||||||
localBranch=$(git branch | grep -c "${wantedBranch}")
|
|
||||||
if [ ${localBranch} -eq 0 ]; then
|
|
||||||
echo "# checkout/changing branch .."
|
echo "# checkout/changing branch .."
|
||||||
|
git fetch
|
||||||
git checkout -b ${wantedBranch} origin/${wantedBranch}
|
git checkout -b ${wantedBranch} origin/${wantedBranch}
|
||||||
else
|
else
|
||||||
echo "# changing branch .."
|
echo "# changing branch .."
|
||||||
|
Reference in New Issue
Block a user