Merge tag '2.0.6.1' of https://github.com/MarlinFirmware/Marlin into master
This commit is contained in:
@ -14,11 +14,9 @@ FORK=${INFO[1]}
|
||||
REPO=${INFO[2]}
|
||||
BRANCH=${INFO[5]}
|
||||
|
||||
git push --set-upstream origin $BRANCH
|
||||
git push --set-upstream origin HEAD:$BRANCH
|
||||
|
||||
which xdg-open >/dev/null && TOOL=xdg-open
|
||||
which gnome-open >/dev/null && TOOL=gnome-open
|
||||
which open >/dev/null && TOOL=open
|
||||
OPEN=$(echo $(which gnome-open xdg-open open) | awk '{ print $1 }')
|
||||
URL="https://github.com/$FORK/$REPO/commits/$BRANCH"
|
||||
|
||||
if [ -z "$OPEN" ]; then
|
||||
|
@ -5,29 +5,35 @@
|
||||
# Set all remotes in the current repo to HTTPS or SSH connection.
|
||||
# Useful when switching environments, using public wifi, etc.
|
||||
#
|
||||
# Optionally, specify a particular remote to change.
|
||||
#
|
||||
|
||||
GH_SSH="git@github\.com:"
|
||||
GH_HTTPS="https:\/\/github\.com\/"
|
||||
|
||||
case "$1" in
|
||||
-[Hh]) TYPE=HTTPS ; MATCH="git@" ; FORMULA="$GH_SSH/$GH_HTTPS" ;;
|
||||
-[Ss]) TYPE=SSH ; MATCH="https:" ; FORMULA="$GH_HTTPS/$GH_SSH" ;;
|
||||
-[Hh]) TYPE=HTTPS ; MATCH="git@" ; REPLACE="$GH_SSH/$GH_HTTPS" ;;
|
||||
-[Ss]) TYPE=SSH ; MATCH="https:" ; REPLACE="$GH_HTTPS/$GH_SSH" ;;
|
||||
*)
|
||||
echo "usage: `basename $0` -h | -s" 1>&2
|
||||
echo "Usage: `basename $0` -h | -s" 1>&2
|
||||
echo -e " \e[0;92m-h\e[0m to switch to HTTPS" 1>&2
|
||||
echo -e " \e[0;92m-s\e[0m to switch to SSH" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
REMOTES=$(git remote -v | egrep "\t$MATCH" | gawk '{print $1 " " $2}' | sort -u | sed "s/$FORMULA/")
|
||||
AWK=$(which gawk || which awk)
|
||||
|
||||
if [[ -z $REMOTES ]]; then
|
||||
echo "Nothing to do." ; exit
|
||||
fi
|
||||
# Match all or specified remotes of the other type
|
||||
REGEX="\t$MATCH" ; [[ $# > 1 ]] && REGEX="^$2$REGEX"
|
||||
|
||||
REMOTES=$(git remote -v | egrep "$REGEX" | "$AWK" '{print $1 " " $2}' | sort -u | sed "s/$REPLACE/")
|
||||
|
||||
[[ -z $REMOTES ]] && { echo "Nothing to do." ; exit ; }
|
||||
|
||||
# Update a remote for each results pair
|
||||
echo "$REMOTES" | xargs -n2 git remote set-url
|
||||
|
||||
echo -n "Remotes set to $TYPE: "
|
||||
echo "$REMOTES" | gawk '{printf "%s ", $1}'
|
||||
echo "$REMOTES" | "$AWK" '{printf "%s ", $1}'
|
||||
echo
|
||||
|
@ -6,6 +6,8 @@
|
||||
# Great way to clean up your branches after messing around a lot
|
||||
#
|
||||
|
||||
AWK=$(which gawk || which awk)
|
||||
|
||||
KEEP="RC|RCBugFix|dev|master|bugfix-1|bugfix-2"
|
||||
|
||||
echo "Fetching latest upstream and origin..."
|
||||
@ -18,7 +20,7 @@ git branch --merged | egrep -v "^\*|$KEEP" | xargs -n 1 git branch -d
|
||||
echo
|
||||
|
||||
echo "Pruning Remotely-deleted Branches..."
|
||||
git branch -vv | egrep -v "^\*|$KEEP" | grep ': gone]' | gawk '{print $1}' | xargs -n 1 git branch -D
|
||||
git branch -vv | egrep -v "^\*|$KEEP" | grep ': gone]' | "$AWK" '{print $1}' | xargs -n 1 git branch -D
|
||||
echo
|
||||
|
||||
# List fork branches that don't match local branches
|
||||
|
@ -23,9 +23,7 @@ OLDBRANCH=${INFO[5]}
|
||||
# See if it's been pushed yet
|
||||
if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then firstpush; fi
|
||||
|
||||
which xdg-open >/dev/null && TOOL=xdg-open
|
||||
which gnome-open >/dev/null && TOOL=gnome-open
|
||||
which open >/dev/null && TOOL=open
|
||||
OPEN=$(echo $(which gnome-open xdg-open open) | awk '{ print $1 }')
|
||||
URL="https://github.com/$ORG/$REPO/compare/$TARG...$FORK:$BRANCH?expand=1"
|
||||
|
||||
if [ -z "$OPEN" ]; then
|
||||
|
@ -67,11 +67,11 @@ if [[ $BRANCH == $TARG ]]; then
|
||||
# Allow working directly with the main fork
|
||||
echo
|
||||
echo -n "Pushing to origin/$TARG... "
|
||||
git push -f origin
|
||||
git push origin HEAD:$TARG
|
||||
|
||||
echo
|
||||
echo -n "Pushing to upstream/$TARG... "
|
||||
git push -f upstream
|
||||
git push upstream HEAD:$TARG
|
||||
|
||||
else
|
||||
|
||||
@ -126,7 +126,7 @@ git push -f origin
|
||||
git push -f upstream | {
|
||||
while IFS= read -r line
|
||||
do
|
||||
[[ $line =~ "gh-pages -> gh-pages" ]] && opensite "http://marlinfw.org/"
|
||||
[[ $line =~ "gh-pages -> gh-pages" ]] && opensite "https://marlinfw.org/"
|
||||
echo "$line"
|
||||
done
|
||||
}
|
||||
@ -135,4 +135,4 @@ git push -f upstream | {
|
||||
rm -rf ${TMPFOLDER}
|
||||
|
||||
# Go back to the branch we started from
|
||||
[[ $BRANCH != $CURR ]] && git checkout $BRANCH && [[ $HAS_STASH == 1 ]] && git stash pop
|
||||
git checkout $CURR && [[ $HAS_STASH == 1 ]] && git stash pop
|
||||
|
@ -9,7 +9,8 @@
|
||||
MFINFO=$(mfinfo) || exit 1
|
||||
[[ -d Marlin/src ]] || { echo "Please 'cd' up to repo root." ; exit 1 ; }
|
||||
|
||||
TESTPATH=buildroot/share/tests
|
||||
TESTPATH=buildroot/tests
|
||||
|
||||
STATE_FILE=$( echo ./.pio/.mftestrc )
|
||||
SED=$(which gsed || which sed)
|
||||
|
||||
|
Reference in New Issue
Block a user