Bump
This commit is contained in:
@@ -16,13 +16,15 @@ BRANCH=${INFO[5]}
|
||||
|
||||
git push --set-upstream origin $BRANCH
|
||||
|
||||
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
|
||||
which xdg-open >/dev/null && TOOL=xdg-open
|
||||
which gnome-open >/dev/null && TOOL=gnome-open
|
||||
which open >/dev/null && TOOL=open
|
||||
URL="https://github.com/$FORK/$REPO/commits/$BRANCH"
|
||||
|
||||
if [ -z "$TOOL" ]; then
|
||||
if [ -z "$OPEN" ]; then
|
||||
echo "Can't find a tool to open the URL:"
|
||||
echo $URL
|
||||
else
|
||||
echo "Viewing commits on $BRANCH..."
|
||||
"$TOOL" "$URL"
|
||||
"$OPEN" "$URL"
|
||||
fi
|
||||
|
||||
@@ -16,14 +16,16 @@ BRANCH=${INFO[5]}
|
||||
[[ $ORG == "MarlinFirmware" && $REPO == "MarlinDocumentation" ]] || { echo "Wrong repository." 1>&2; exit 1; }
|
||||
|
||||
opensite() {
|
||||
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
|
||||
which xdg-open >/dev/null && TOOL=xdg-open
|
||||
which gnome-open >/dev/null && TOOL=gnome-open
|
||||
which open >/dev/null && TOOL=open
|
||||
URL="http://127.0.0.1:4000/"
|
||||
if [ -z "$TOOL" ]; then
|
||||
if [ -z "$OPEN" ]; then
|
||||
echo "Can't find a tool to open the URL:"
|
||||
echo $URL
|
||||
else
|
||||
echo "Opening preview site in the browser..."
|
||||
"$TOOL" "$URL"
|
||||
"$OPEN" "$URL"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -23,15 +23,17 @@ OLDBRANCH=${INFO[5]}
|
||||
# See if it's been pushed yet
|
||||
if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then firstpush; fi
|
||||
|
||||
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
|
||||
which xdg-open >/dev/null && TOOL=xdg-open
|
||||
which gnome-open >/dev/null && TOOL=gnome-open
|
||||
which open >/dev/null && TOOL=open
|
||||
URL="https://github.com/$ORG/$REPO/compare/$TARG...$FORK:$BRANCH?expand=1"
|
||||
|
||||
if [ -z "$TOOL" ]; then
|
||||
if [ -z "$OPEN" ]; then
|
||||
echo "Can't find a tool to open the URL:"
|
||||
echo $URL
|
||||
else
|
||||
echo "Opening a New PR Form..."
|
||||
"$TOOL" "$URL"
|
||||
"$OPEN" "$URL"
|
||||
fi
|
||||
|
||||
[[ $BRANCH != $OLDBRANCH ]] && git checkout $OLDBRANCH
|
||||
|
||||
@@ -77,15 +77,17 @@ else
|
||||
git push -f origin
|
||||
fi
|
||||
|
||||
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
|
||||
which xdg-open >/dev/null && TOOL=xdg-open
|
||||
which gnome-open >/dev/null && TOOL=gnome-open
|
||||
which open >/dev/null && TOOL=open
|
||||
URL="https://github.com/$ORG/$REPO/compare/$TARG...$FORK:$BRANCH?expand=1"
|
||||
|
||||
if [ -z "$TOOL" ]; then
|
||||
if [ -z "$OPEN" ]; then
|
||||
echo "Can't find a tool to open the URL:"
|
||||
echo $URL
|
||||
else
|
||||
echo "Opening a New PR Form..."
|
||||
"$TOOL" "$URL"
|
||||
"$OPEN" "$URL"
|
||||
fi
|
||||
|
||||
fi
|
||||
@@ -116,14 +118,16 @@ git checkout gh-pages || { echo "Something went wrong!"; exit 1; }
|
||||
rsync -av ${TMPFOLDER}/ ./
|
||||
|
||||
opensite() {
|
||||
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
|
||||
which xdg-open >/dev/null && TOOL=xdg-open
|
||||
which gnome-open >/dev/null && TOOL=gnome-open
|
||||
which open >/dev/null && TOOL=open
|
||||
URL="http://marlinfw.org/"
|
||||
if [ -z "$TOOL" ]; then
|
||||
if [ -z "$OPEN" ]; then
|
||||
echo "Can't find a tool to open the URL:"
|
||||
echo $URL
|
||||
else
|
||||
echo "Opening the site in the browser..."
|
||||
"$TOOL" "$URL"
|
||||
"$OPEN" "$URL"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -11,11 +11,13 @@ MFINFO=$(mfinfo) || exit 1
|
||||
[[ -d Marlin/src ]] || { echo "Please 'cd' up to repo root." ; exit 1 ; }
|
||||
|
||||
TESTPATH=buildroot/share/tests
|
||||
STATE_FILE=$( echo ./.pio/.mftestrc )
|
||||
|
||||
shopt -s extglob nocasematch
|
||||
|
||||
# Get test
|
||||
# Get the environment and test number from the command
|
||||
TESTENV=${1:-'-'}
|
||||
CHOICE=${2:-0}
|
||||
|
||||
# Allow shorthand for test name
|
||||
case $TESTENV in
|
||||
@@ -28,8 +30,8 @@ case $TESTENV in
|
||||
m128) TESTENV='megaatmega1280' ;;
|
||||
m256) TESTENV='megaatmega2560' ;;
|
||||
mega) TESTENV='megaatmega2560' ;;
|
||||
stm) TESTENV='STM32F103R' ;;
|
||||
f1) TESTENV='STM32F103R' ;;
|
||||
stm) TESTENV='STM32F103RE' ;;
|
||||
f1) TESTENV='STM32F103RE' ;;
|
||||
f4) TESTENV='STM32F4' ;;
|
||||
f7) TESTENV='STM32F7' ;;
|
||||
teensy) TESTENV='teensy31' ;;
|
||||
@@ -37,6 +39,15 @@ case $TESTENV in
|
||||
t32) TESTENV='teensy31' ;;
|
||||
t35) TESTENV='teensy35' ;;
|
||||
t36) TESTENV='teensy35' ;;
|
||||
# Build with the last-built env
|
||||
-r) [[ -f "$STATE_FILE" ]] || { echo "No previous (-r) build state found." ; exit 1 ; }
|
||||
read TESTENV <"$STATE_FILE"
|
||||
platformio run --project-dir . -e $TESTENV
|
||||
exit
|
||||
;;
|
||||
# A -y may come first
|
||||
-y) TESTENV=${2:-'-'} ; CHOICE=${3:-0} ;;
|
||||
-[a-z]) echo "Unknown flag $TESTENV" ; exit 1 ;;
|
||||
-) ;;
|
||||
esac
|
||||
|
||||
@@ -77,9 +88,6 @@ OUT=$( cat $TESTPATH/$TESTENV-tests 2>/dev/null ) || { echo "Can't find test '$T
|
||||
# TODO: List test descriptions with numbers
|
||||
TESTCOUNT=$( awk "/$ISEXEC/{a++}END{print a}" <<<"$OUT" )
|
||||
|
||||
# Get the entered or interactive test index
|
||||
CHOICE=${2:-0}
|
||||
|
||||
# User entered a number?
|
||||
(( CHOICE && CHOICE > TESTCOUNT )) && { echo "Invalid test index '$CHOICE' (1-$TESTCOUNT)." ; exit 1 ; }
|
||||
|
||||
@@ -135,6 +143,16 @@ echo "$OUT" | {
|
||||
done
|
||||
}
|
||||
|
||||
# Get a -y parameter the lazy way
|
||||
[[ "$2" == "-y" || "$3" == "-y" ]] && BUILD_YES='Y'
|
||||
|
||||
# Build the test too?
|
||||
echo ; read -p "Build $TESTENV test #$CHOICE (y/N) ? " BUILD_YES
|
||||
[[ $BUILD_YES == 'Y' || $BUILD_YES == 'Yes' ]] && platformio run --project-dir . -e $TESTENV
|
||||
if [[ $BUILD_YES != 'Y' ]]; then
|
||||
echo
|
||||
read -p "Build $TESTENV test #$CHOICE (y/N) ? " BUILD_YES
|
||||
fi
|
||||
|
||||
[[ $BUILD_YES == 'Y' || $BUILD_YES == 'Yes' ]] && {
|
||||
platformio run --project-dir . -e $TESTENV
|
||||
echo "$TESTENV" >"$STATE_FILE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user