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
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

View file

@ -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
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