Simplify mfdoc, mfpub

This commit is contained in:
Scott Lahteine 2017-05-11 01:21:46 -05:00
parent ee50dfaaf3
commit 301958b3e0
2 changed files with 8 additions and 19 deletions

View File

@ -16,12 +16,6 @@ if [[ $ORG != "MarlinFirmware" || $REPO != "MarlinDocumentation" ]]; then
exit exit
fi fi
if [[ $BRANCH != "master" ]]; then
echo "Stashing changes and changing to master."
git stash
git checkout master
fi
opensite() { opensite() {
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }') TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
URL="http://127.0.0.1:4000/" URL="http://127.0.0.1:4000/"
@ -40,9 +34,3 @@ echo "Previewing MarlinDocumentation..."
( sleep 45; opensite ) & ( sleep 45; opensite ) &
bundle exec jekyll serve --watch --incremental bundle exec jekyll serve --watch --incremental
if [[ $BRANCH != "master" ]]; then
echo "Restoring branch '$BRANCH'"
git checkout $BRANCH
git stash pop
fi

View File

@ -30,26 +30,25 @@ if [[ $BRANCH == "gh-pages" ]]; then
exit exit
fi fi
if [[ $BRANCH != "master" ]]; then echo "Stashing any changes to files..."
echo "Stashing any changes to files..." echo "Don't forget to update and push 'master'!"
echo "Don't forget to update and push 'master'!" # GOJF Card
# GOJF Card git stash
git stash
fi
COMMIT=$( git log --format="%H" -n 1 ) COMMIT=$( git log --format="%H" -n 1 )
# Clean out changes and other junk in the branch # Clean out changes and other junk in the branch
git reset --hard
git clean -d -f git clean -d -f
# Push 'master' to the fork and make a proper PR... # Push 'master' to the fork and make a proper PR...
if [[ $BRANCH == "master" ]]; then if [[ $BRANCH == "master" ]]; then
# Allow working directly with the main fork # Allow working directly with the main fork
echo
echo -n "Pushing to origin/master... " echo -n "Pushing to origin/master... "
git push -f origin git push -f origin
echo
echo -n "Pushing to upstream/master... " echo -n "Pushing to upstream/master... "
git push -f upstream git push -f upstream
@ -58,6 +57,7 @@ else
if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then
firstpush firstpush
else else
echo
echo -n "Pushing to origin/$BRANCH... " echo -n "Pushing to origin/$BRANCH... "
git push -f origin git push -f origin
fi fi
@ -79,6 +79,7 @@ fi
# mv ./_plugins/jekyll-press.rb-disabled ./_plugins/jekyll-press.rb # mv ./_plugins/jekyll-press.rb-disabled ./_plugins/jekyll-press.rb
# bundle install # bundle install
echo
echo "Generating MarlinDocumentation..." echo "Generating MarlinDocumentation..."
# build the site statically and proof it # build the site statically and proof it