Scott Lahteine 4 anni fa
parent
commit
202840e750
1 ha cambiato i file con 7 aggiunte e 17 eliminazioni
  1. 7
    17
      buildroot/share/git/mfqp

+ 7
- 17
buildroot/share/git/mfqp Vedi File

1
 #!/usr/bin/env bash
1
 #!/usr/bin/env bash
2
 #
2
 #
3
-# mfqp [-q|--quick] [1|2|3]
3
+# mfqp [1|2|3]
4
 #
4
 #
5
-# Add all changed files, commit as "patch", do `mfrb` and `git push -f`
5
+#  - git add .
6
+#  - git commit --amend
7
+#  - ghpc
6
 #
8
 #
7
 
9
 
8
 MFINFO=$(mfinfo "$@") || exit 1
10
 MFINFO=$(mfinfo "$@") || exit 1
15
 while [ $IND -lt ${#INFO[@]} ]; do
17
 while [ $IND -lt ${#INFO[@]} ]; do
16
   ARG=${INFO[$IND]}
18
   ARG=${INFO[$IND]}
17
   case "$ARG" in
19
   case "$ARG" in
18
-    -q|--quick ) QUICK="-q" ;;
19
      -h|--help ) USAGE=1 ;;
20
      -h|--help ) USAGE=1 ;;
20
              * ) USAGE=1 ; echo "unknown option: $ARG" ;;
21
              * ) USAGE=1 ; echo "unknown option: $ARG" ;;
21
   esac
22
   esac
22
   let IND+=1
23
   let IND+=1
23
 done
24
 done
24
 
25
 
25
-[[ ${INFO[4]} =~ [0-9] ]] && USAGE=1
26
+[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2|3]" 1>&2 ; exit 1 ; }
26
 
27
 
27
-[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2|3]" 1>&2 ; exit 1 ; }
28
+[[ $CURR == $TARG && $REPO != "MarlinDocumentation" ]] && { echo "Don't alter the PR Target branch."; exit 1 ; }
28
 
29
 
29
-git add .
30
-git commit -m "patch"
31
-
32
-if [[ $CURR == $TARG ]]; then
33
-  if [[ $REPO == "MarlinDocumentation" ]]; then
34
-    git rebase -i HEAD~2 && git push -f
35
-  else
36
-    echo "Don't alter the PR Target branch."; exit 1
37
-  fi
38
-else
39
-  mfrb $QUICK "$@" && git push -f
40
-fi
30
+git add . && git commit --amend && git push -f

Loading…
Annulla
Salva