mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
build HTML distribution (but not upload it yet)
This commit is contained in:
@@ -8,6 +8,8 @@ die () {
|
||||
|
||||
echo "started build"
|
||||
|
||||
revision=`hg tip | grep changeset|cut -d":" -f2|cut -d" " -f4`
|
||||
|
||||
# make build directory and copy original files there for preflighting
|
||||
rm -rf build
|
||||
mkdir build
|
||||
@@ -18,6 +20,21 @@ rm -f examples/*.pyc
|
||||
cp -R examples build/
|
||||
cp .htaccess build/
|
||||
|
||||
echo "building HTML distribution"
|
||||
htmldir=build/diveintopython3-r"$revision"
|
||||
mkdir "$htmldir"
|
||||
cp *.html "$htmldir"/
|
||||
cp dip3.css "$htmldir"/
|
||||
mkdir "$htmldir"/i
|
||||
cp i/*.png "$htmldir"/i/
|
||||
mkdir "$htmldir"/j
|
||||
cp j/dip3.js j/html5.js j/jquery.js j/prettify.js "$htmldir"/j/
|
||||
mkdir "$htmldir"/examples
|
||||
cp examples/*.jpg examples/*.json examples/*.pickle examples/*.py examples/*.txt examples/*.xml "$htmldir"/examples/
|
||||
cd build/ && \
|
||||
zip -9rq diveintopython3-r"$revision".zip diveintopython3-r"$revision" && \
|
||||
cd ..
|
||||
|
||||
echo "linting JS"
|
||||
|
||||
[ -n "$(which js 2>/dev/null)" ] || die "SpiderMonkey (js or js.exe) not found"
|
||||
|
||||
Reference in New Issue
Block a user