mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 02:09:15 +01:00
Repair Switching Branches and PRs (#1541)
This commit is contained in:
parent
96f107f2c3
commit
0e79d54d02
@ -177,13 +177,28 @@ patch()
|
||||
if [ $exitstatus = 0 ]; then
|
||||
newGitHubBranch=$(echo "${newGitHubBranch}" | cut -d " " -f1)
|
||||
echo "--> " $newGitHubBranch
|
||||
sudo -u admin /home/admin/XXsyncScripts.sh ${newGitHubBranch}
|
||||
sleep 4
|
||||
fi
|
||||
patch
|
||||
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 -run ${newGitHubBranch})
|
||||
source <(sudo -u admin /home/admin/XXsyncScripts.sh ${pullRequestID}pr)
|
||||
if [ ${#error} -gt 0 ]; then
|
||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||
fi
|
||||
fi
|
||||
patch
|
||||
exit 1
|
||||
;;
|
||||
PR)
|
||||
|
Loading…
Reference in New Issue
Block a user