2019-05-11 16:48:31 +03:00
|
|
|
.PHONY: all gh-pages
|
|
|
|
|
|
|
|
# Ensure `cd` works properly by forcing everything to be executed in a single shell.
|
2019-05-11 16:18:07 +03:00
|
|
|
.ONESHELL:
|
2019-05-11 16:48:31 +03:00
|
|
|
|
|
|
|
# Build KaTeX.
|
2019-05-11 16:18:07 +03:00
|
|
|
all:
|
|
|
|
git submodule update --init --recursive
|
|
|
|
cd src/KaTeX
|
|
|
|
yarn
|
|
|
|
yarn build
|
2019-05-11 16:48:31 +03:00
|
|
|
|
|
|
|
# Update the quiver GitHub Pages application.
|
|
|
|
gh-pages:
|
2020-03-04 16:01:09 +03:00
|
|
|
# Make sure we split out a subtree from master, rather than the branch we are currently on.
|
|
|
|
git checkout master
|
|
|
|
# Split out the `src` subdirectory and push it to the `pre-gh-pages` branch on remote `origin`.
|
2019-05-11 16:48:31 +03:00
|
|
|
git subtree push --prefix src origin pre-gh-pages
|
2020-03-04 16:01:09 +03:00
|
|
|
# Rebase the changes over the fixed commits on `gh-pages` (i.e. manually adding KaTeX).
|
2019-05-11 16:48:31 +03:00
|
|
|
git worktree add ../quiver-worktree pre-gh-pages
|
|
|
|
cd ../quiver-worktree
|
|
|
|
git pull
|
|
|
|
git checkout gh-pages
|
|
|
|
git rebase pre-gh-pages
|
|
|
|
git push --force
|
|
|
|
cd ../quiver
|
|
|
|
git worktree remove ../quiver-worktree
|
2020-03-04 16:01:09 +03:00
|
|
|
# Checkout the branch we were originally working on.
|
|
|
|
git checkout @{-1}
|