Quellcode durchsuchen

Tweak mfqp script

Scott Lahteine vor 4 Jahren
Ursprung
Commit
202840e750
1 geänderte Dateien mit 7 neuen und 17 gelöschten Zeilen
  1. 7
    17
      buildroot/share/git/mfqp

+ 7
- 17
buildroot/share/git/mfqp Datei anzeigen

@@ -1,8 +1,10 @@
1 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 10
 MFINFO=$(mfinfo "$@") || exit 1
@@ -15,26 +17,14 @@ IND=6
15 17
 while [ $IND -lt ${#INFO[@]} ]; do
16 18
   ARG=${INFO[$IND]}
17 19
   case "$ARG" in
18
-    -q|--quick ) QUICK="-q" ;;
19 20
      -h|--help ) USAGE=1 ;;
20 21
              * ) USAGE=1 ; echo "unknown option: $ARG" ;;
21 22
   esac
22 23
   let IND+=1
23 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

Laden…
Abbrechen
Speichern