Show More
@@ -1,10 +1,10 b'' | |||
|
1 | 1 | git hooks for IPython |
|
2 | 2 | |
|
3 | 3 | add these to your `.git/hooks` |
|
4 | 4 | |
|
5 | 5 | For now, we just have `post-checkout` and `post-merge`, |
|
6 | both of which just update submodules, | |
|
6 | both of which update submodules and attempt to rebuild css sourcemaps, | |
|
7 | 7 | so make sure that you have a fully synced repo whenever you checkout or pull. |
|
8 | 8 | |
|
9 | 9 | To use these hooks, run `./install-hooks.sh`. |
|
10 | 10 | If you havn't initialised and updated the submodules manually, you will then need to run `git checkout master` to activate the hooks (even if you already have `master` checked out). |
@@ -1,4 +1,17 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | git submodule init |
|
4 | 4 | git submodule update |
|
5 | ||
|
6 | PREVIOUS_HEAD=$1 | |
|
7 | # if style changed (and less/fabric available), rebuild sourcemaps | |
|
8 | if [[ | |
|
9 | ! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/ipython.min.css)" | |
|
10 | && ! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/style.min.css)" | |
|
11 | && ! -z $(which 2>/dev/null lessc) | |
|
12 | && ! -z $(which 2>/dev/null fab) | |
|
13 | ]]; then | |
|
14 | echo "rebuilding sourcemaps" | |
|
15 | cd IPython/html | |
|
16 | fab css | |
|
17 | fi |
@@ -1,4 +1,17 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | git submodule init |
|
4 | 4 | git submodule update |
|
5 | ||
|
6 | PREVIOUS_HEAD=$1 | |
|
7 | # if style changed (and less/fabric available), rebuild sourcemaps | |
|
8 | if [[ | |
|
9 | ! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/ipython.min.css)" | |
|
10 | && ! -z "$(git diff $PREVIOUS_HEAD IPython/html/static/style/style.min.css)" | |
|
11 | && ! -z $(which 2>/dev/null lessc) | |
|
12 | && ! -z $(which 2>/dev/null fab) | |
|
13 | ]]; then | |
|
14 | echo "rebuilding sourcemaps" | |
|
15 | cd IPython/html | |
|
16 | fab css | |
|
17 | fi |
General Comments 0
You need to be logged in to leave comments.
Login now