Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
60a4ca11
Commit
60a4ca11
authored
8 years ago
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Better mfpub
parent
df424282
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildroot/share/git/mfpub
+30
-23
30 additions, 23 deletions
buildroot/share/git/mfpub
with
30 additions
and
23 deletions
buildroot/share/git/mfpub
+
30
−
23
View file @
60a4ca11
...
...
@@ -22,23 +22,21 @@ if [[ $ORG != "MarlinFirmware" || $REPO != "MarlinDocumentation" ]]; then
exit
fi
# Check out the named branch (or stay in current)
git checkout
$BRANCH
if
[[
$BRANCH
==
"gh-pages"
]]
;
then
echo
"Can't build from 'gh-pages.' Only the Jekyll branches (based on 'master')."
bundle
exec
jekyll serve
--watch
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
# Check out the named branch (or stay in current)
git checkout
$BRANCH
echo
"Generating MarlinDocumentation..."
COMMIT
=
$(
git log
--format
=
"%H"
-n
1
)
# Clean out changes and other junk in the branch
...
...
@@ -48,16 +46,21 @@ git clean -d -f
# Push 'master' to the fork and make a proper PR...
if
[[
$BRANCH
==
"master"
]]
;
then
if
[[
$FORK
==
"MarlinFirmware"
]]
;
then
# Allow working directly with the main fork
echo
-n
"Pushing to origin/master... "
git push
-f
origin
echo
-n
"Pushing to upstream/master... "
git push
-f
upstream
else
if
[
-z
"
$(
git branch
-vv
|
grep
^
\*
|
grep
\\
[
origin
)
"
]
;
then
firstpush
;
fi
if
[
-z
"
$(
git branch
-vv
|
grep
^
\*
|
grep
\\
[
origin
)
"
]
;
then
firstpush
else
echo
-n
"Pushing to origin/
$BRANCH
... "
git push
-f
origin
fi
TOOL
=
$(
which gnome-open xdg-open open |
awk
'{ print $1 }'
)
URL
=
"https://github.com/
$ORG
/
$REPO
/compare/
$TARG
...
$FORK
:
$BRANCH
?expand=1"
...
...
@@ -72,12 +75,12 @@ if [[ $BRANCH == "master" ]]; then
fi
fi
# Uncomment to compress the final html files
# mv ./_plugins/jekyll-press.rb-disabled ./_plugins/jekyll-press.rb
# bundle install
echo
"Generating MarlinDocumentation..."
# build the site statically and proof it
bundle
exec
jekyll build
--profile
--trace
--no-watch
bundle
exec
htmlproofer ./_site
--only-4xx
--allow-hash-href
--check-favicon
--check-html
--url-swap
".*marlinfw.org/:/"
...
...
@@ -90,7 +93,7 @@ rsync -av _site/ ${TMPFOLDER}/
git reset
--hard
git clean
-d
-f
#
Sync
built-site
w
ith gh-pages
#
Copy
built-site i
nto
th
e
gh-pages
branch
git checkout gh-pages
rsync
-av
${
TMPFOLDER
}
/ ./
...
...
@@ -104,3 +107,7 @@ rm -rf ${TMPFOLDER}
# Go back to the branch we started from
git checkout
$BRANCH
if
[[
$BRANCH
!=
"master"
]]
;
then
git stash pop
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment