diff --git a/buildroot/share/git/mfdoc b/buildroot/share/git/mfdoc index 3880c6dacb..4b28e9ca14 100755 --- a/buildroot/share/git/mfdoc +++ b/buildroot/share/git/mfdoc @@ -16,12 +16,6 @@ if [[ $ORG != "MarlinFirmware" || $REPO != "MarlinDocumentation" ]]; then exit fi -if [[ $BRANCH != "master" ]]; then - echo "Stashing changes and changing to master." - git stash - git checkout master -fi - opensite() { TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }') URL="http://127.0.0.1:4000/" @@ -40,9 +34,3 @@ echo "Previewing MarlinDocumentation..." ( sleep 45; opensite ) & bundle exec jekyll serve --watch --incremental - -if [[ $BRANCH != "master" ]]; then - echo "Restoring branch '$BRANCH'" - git checkout $BRANCH - git stash pop -fi diff --git a/buildroot/share/git/mfpub b/buildroot/share/git/mfpub index 190e47ae8b..9e590eb074 100755 --- a/buildroot/share/git/mfpub +++ b/buildroot/share/git/mfpub @@ -30,26 +30,25 @@ if [[ $BRANCH == "gh-pages" ]]; then exit fi -if [[ $BRANCH != "master" ]]; then - echo "Stashing any changes to files..." - echo "Don't forget to update and push 'master'!" - # GOJF Card - git stash -fi +echo "Stashing any changes to files..." +echo "Don't forget to update and push 'master'!" +# GOJF Card +git stash COMMIT=$( git log --format="%H" -n 1 ) # Clean out changes and other junk in the branch -git reset --hard git clean -d -f # Push 'master' to the fork and make a proper PR... if [[ $BRANCH == "master" ]]; then # Allow working directly with the main fork + echo echo -n "Pushing to origin/master... " git push -f origin + echo echo -n "Pushing to upstream/master... " git push -f upstream @@ -58,6 +57,7 @@ else if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then firstpush else + echo echo -n "Pushing to origin/$BRANCH... " git push -f origin fi @@ -79,6 +79,7 @@ fi # mv ./_plugins/jekyll-press.rb-disabled ./_plugins/jekyll-press.rb # bundle install +echo echo "Generating MarlinDocumentation..." # build the site statically and proof it