mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
eaa3c0ac36
closes #18
23 lines
520 B
Bash
Executable File
23 lines
520 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ "$(basename $0)" == "post-merge" ]]; then
|
|
PREVIOUS_HEAD=ORIG_HEAD
|
|
else
|
|
PREVIOUS_HEAD=$1
|
|
fi
|
|
|
|
# if style changed (and less available), rebuild sourcemaps
|
|
if [[
|
|
! -z "$(git diff $PREVIOUS_HEAD notebook/static/*/js/**.js)"
|
|
]]; then
|
|
echo "rebuilding javascript"
|
|
python setup.py js || echo "fail to rebuild javascript"
|
|
fi
|
|
|
|
if [[
|
|
! -z "$(git diff $PREVIOUS_HEAD notebook/static/*/less/**.less)"
|
|
]]; then
|
|
echo "rebuilding css sourcemaps"
|
|
python setup.py css || echo "fail to recompile css"
|
|
fi
|