attempt to regen source maps in git-hooks

if css changes
This commit is contained in:
MinRK 2014-07-23 14:55:58 -07:00
parent 6ea0bd4e94
commit 0c1074223b
3 changed files with 27 additions and 1 deletions

View File

@ -3,7 +3,7 @@ git hooks for IPython
add these to your `.git/hooks`
For now, we just have `post-checkout` and `post-merge`,
both of which just update submodules,
both of which update submodules and attempt to rebuild css sourcemaps,
so make sure that you have a fully synced repo whenever you checkout or pull.
To use these hooks, run `./install-hooks.sh`.

View File

@ -2,3 +2,16 @@
git submodule init
git submodule update
PREVIOUS_HEAD=$1
# if style changed (and less/fabric available), rebuild sourcemaps
if [[
! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/ipython.min.css)"
&& ! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/style.min.css)"
&& ! -z $(which 2>/dev/null lessc)
&& ! -z $(which 2>/dev/null fab)
]]; then
echo "rebuilding sourcemaps"
cd IPython/html
fab css
fi

View File

@ -2,3 +2,16 @@
git submodule init
git submodule update
PREVIOUS_HEAD=$1
# if style changed (and less/fabric available), rebuild sourcemaps
if [[
! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/ipython.min.css)"
&& ! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/style.min.css)"
&& ! -z $(which 2>/dev/null lessc)
&& ! -z $(which 2>/dev/null fab)
]]; then
echo "rebuilding sourcemaps"
cd IPython/html
fab css
fi