ソースを参照

Simplify mfdoc, mfpub

Scott Lahteine 7年前
コミット
301958b3e0
2個のファイルの変更8行の追加19行の削除
  1. 0
    12
      buildroot/share/git/mfdoc
  2. 8
    7
      buildroot/share/git/mfpub

+ 0
- 12
buildroot/share/git/mfdoc ファイルの表示

@@ -16,12 +16,6 @@ if [[ $ORG != "MarlinFirmware" || $REPO != "MarlinDocumentation" ]]; then
16 16
   exit
17 17
 fi
18 18
 
19
-if [[ $BRANCH != "master" ]]; then
20
-  echo "Stashing changes and changing to master."
21
-  git stash
22
-  git checkout master
23
-fi
24
-
25 19
 opensite() {
26 20
   TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
27 21
   URL="http://127.0.0.1:4000/"
@@ -40,9 +34,3 @@ echo "Previewing MarlinDocumentation..."
40 34
 ( sleep 45; opensite ) &
41 35
 
42 36
 bundle exec jekyll serve --watch --incremental
43
-
44
-if [[ $BRANCH != "master" ]]; then
45
-  echo "Restoring branch '$BRANCH'"
46
-  git checkout $BRANCH
47
-  git stash pop
48
-fi

+ 8
- 7
buildroot/share/git/mfpub ファイルの表示

@@ -30,26 +30,25 @@ if [[ $BRANCH == "gh-pages" ]]; then
30 30
   exit
31 31
 fi
32 32
 
33
-if [[ $BRANCH != "master" ]]; then
34
-  echo "Stashing any changes to files..."
35
-  echo "Don't forget to update and push 'master'!"
36
-  # GOJF Card
37
-  git stash
38
-fi
33
+echo "Stashing any changes to files..."
34
+echo "Don't forget to update and push 'master'!"
35
+# GOJF Card
36
+git stash
39 37
 
40 38
 COMMIT=$( git log --format="%H" -n 1 )
41 39
 
42 40
 # Clean out changes and other junk in the branch
43
-git reset --hard
44 41
 git clean -d -f
45 42
 
46 43
 # Push 'master' to the fork and make a proper PR...
47 44
 if [[ $BRANCH == "master" ]]; then
48 45
 
49 46
   # Allow working directly with the main fork
47
+  echo
50 48
   echo -n "Pushing to origin/master... "
51 49
   git push -f origin
52 50
 
51
+  echo
53 52
   echo -n "Pushing to upstream/master... "
54 53
   git push -f upstream
55 54
 
@@ -58,6 +57,7 @@ else
58 57
   if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then
59 58
     firstpush
60 59
   else
60
+    echo
61 61
     echo -n "Pushing to origin/$BRANCH... "
62 62
     git push -f origin
63 63
   fi
@@ -79,6 +79,7 @@ fi
79 79
 # mv ./_plugins/jekyll-press.rb-disabled ./_plugins/jekyll-press.rb
80 80
 # bundle install
81 81
 
82
+echo
82 83
 echo "Generating MarlinDocumentation..."
83 84
 
84 85
 # build the site statically and proof it

読み込み中…
キャンセル
保存