File: post-checkout

package info (click to toggle)
jupyter-notebook 6.4.13-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,860 kB
  • sloc: javascript: 20,765; python: 15,658; makefile: 255; sh: 160
file content (22 lines) | stat: -rwxr-xr-x 520 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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