Bump to head plus G34 auto assignment
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# mffp [1|2] [commit-id]
|
||||
# mffp [1|2|3] [commit-id]
|
||||
#
|
||||
# Push the given commit (or HEAD) upstream immediately.
|
||||
# By default: `git push upstream HEAD:bugfix-1.1.x`
|
||||
#
|
||||
|
||||
[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2] [commit-id]" 1>&2 ; exit 1; }
|
||||
[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2|3] [commit-id]" 1>&2 ; exit 1; }
|
||||
|
||||
if [[ $1 == '1' || $1 == '2' ]]; then
|
||||
if [[ $1 == '1' || $1 == '2' || $1 == '3' ]]; then
|
||||
MFINFO=$(mfinfo "$1") || exit 1
|
||||
REF=${2:-HEAD}
|
||||
else
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# - Remote (upstream) Org name (MarlinFirmware)
|
||||
# - Remote (origin) Org name (your Github username)
|
||||
# - Repo Name (Marlin, MarlinDocumentation)
|
||||
# - PR Target branch (bugfix-1.1.x, bugfix-2.0.x, etc.)
|
||||
# - PR Target branch (bugfix-1.1.x, bugfix-2.0.x, dev-2.1.x, etc.)
|
||||
# - Branch Arg (the branch argument or current branch)
|
||||
# - Current Branch
|
||||
#
|
||||
@@ -42,19 +42,19 @@ while [[ $# -gt 0 ]]; do
|
||||
|
||||
case "$opt" in
|
||||
-*|--*) MORE="$MORE$opt " ; [[ $EQUALS == 1 ]] && MORE="$MORE=$val" ;;
|
||||
1|2) INDEX=$opt ;;
|
||||
1|2|3) INDEX=$opt ;;
|
||||
*) BRANCH="$opt" ;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
case "$REPO" in
|
||||
Marlin ) TARG=bugfix-1.1.x ; [[ $INDEX == 2 ]] && TARG=bugfix-2.0.x ;;
|
||||
Marlin ) TARG=bugfix-1.1.x ; [[ $INDEX == 2 ]] && TARG=bugfix-2.0.x ; [[ $INDEX == 3 ]] && TARG=dev-2.1.x ;;
|
||||
MarlinDocumentation ) TARG=master ;;
|
||||
esac
|
||||
|
||||
[[ $BRANCH =~ ^[0-9]$ ]] && USAGE=1
|
||||
[[ $BRANCH =~ ^[123]$ ]] && USAGE=1
|
||||
|
||||
[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2] [branch]" 1>&2 ; exit 1 ; }
|
||||
[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2|3] [branch]" 1>&2 ; exit 1 ; }
|
||||
|
||||
echo "$ORG $FORK $REPO $TARG $BRANCH $CURR $MORE"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
usage() {
|
||||
echo "usage: `basename $0` [1|2] [name]" 1>&2
|
||||
echo "usage: `basename $0` [1|2|3] [name]" 1>&2
|
||||
}
|
||||
|
||||
[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { usage; exit 1; }
|
||||
@@ -19,12 +19,12 @@ BRANCH=pr_for_$TARG-$(date +"%G-%m-%d_%H.%M.%S")
|
||||
# BRANCH can be given as the last argument
|
||||
case "$#" in
|
||||
1 ) case "$1" in
|
||||
1|2) ;;
|
||||
1|2|3) ;;
|
||||
*) BRANCH=$1 ;;
|
||||
esac
|
||||
;;
|
||||
2 ) case "$1" in
|
||||
1|2) BRANCH=$2 ;;
|
||||
1|2|3) BRANCH=$2 ;;
|
||||
*) usage ; exit 1 ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# mfpr [1|2]
|
||||
# mfpr [1|2|3]
|
||||
#
|
||||
# Make a PR against bugfix-1.1.x or bugfix-2.0.x
|
||||
#
|
||||
|
||||
[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [branch]" 1>&2 ; exit 1; }
|
||||
[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2|3] [branch]" 1>&2 ; exit 1; }
|
||||
|
||||
MFINFO=$(mfinfo "$@") || exit 1
|
||||
IFS=' ' read -a INFO <<< "$MFINFO"
|
||||
|
||||
@@ -99,15 +99,15 @@ fi
|
||||
echo
|
||||
echo "Generating MarlinDocumentation..."
|
||||
|
||||
rm -rf _site
|
||||
rm -rf build
|
||||
|
||||
# build the site statically and proof it
|
||||
bundle exec jekyll build --profile --trace --no-watch
|
||||
bundle exec htmlproofer ./_site --only-4xx --allow-hash-href --check-favicon --check-html --url-swap ".*marlinfw.org/:/"
|
||||
bundle exec htmlproofer ./build --only-4xx --allow-hash-href --check-favicon --check-html --url-swap ".*marlinfw.org/:/"
|
||||
|
||||
# Sync the built site into a temporary folder
|
||||
TMPFOLDER=$( mktemp -d )
|
||||
rsync -av _site/ ${TMPFOLDER}/
|
||||
rsync -av build/ ${TMPFOLDER}/
|
||||
|
||||
# Clean out changes and other junk in the branch
|
||||
git reset --hard
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# mfqp [-q|--quick] [1|2]
|
||||
# mfqp [-q|--quick] [1|2|3]
|
||||
#
|
||||
# Add all changed files, commit as "patch", do `mfrb` and `git push -f`
|
||||
#
|
||||
@@ -24,7 +24,7 @@ done
|
||||
|
||||
[[ ${INFO[4]} =~ [0-9] ]] && USAGE=1
|
||||
|
||||
[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2]" 1>&2 ; exit 1 ; }
|
||||
[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2|3]" 1>&2 ; exit 1 ; }
|
||||
|
||||
git add .
|
||||
git commit -m "patch"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# mfrb
|
||||
#
|
||||
# Do "git rebase -i" against the "target" branch (bugfix-1.1.x, bugfix-2.0.x, or master)
|
||||
# Do "git rebase -i" against the "target" branch (bugfix-1.1.x, bugfix-2.0.x, dev-2.1.x, or master)
|
||||
#
|
||||
|
||||
MFINFO=$(mfinfo "$@") || exit 1
|
||||
@@ -21,7 +21,7 @@ while [ $IND -lt ${#INFO[@]} ]; do
|
||||
let IND+=1
|
||||
done
|
||||
|
||||
[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2]" 1>&2 ; exit 1 ; }
|
||||
[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2|3]" 1>&2 ; exit 1 ; }
|
||||
|
||||
# If the branch isn't currently the PR target
|
||||
if [[ $TARG != $CURR ]]; then
|
||||
|
||||
Reference in New Issue
Block a user