Commit 88856280 authored by Romain Casati's avatar Romain Casati
Browse files

Lightweight copy for language apps (symlinks).

parent 6e06bb7d
......@@ -2,7 +2,7 @@ image: debian:buster
pages:
script:
- apt-get update && apt-get -y install make python3 python3-setuptools python3-pip python3-jinja2 nodejs npm git tar zip
- apt-get update && apt-get -y install make symlinks python3 python3-setuptools python3-pip python3-jinja2 nodejs npm git tar zip
- make build
- make archives
- mv build/lib/notebook public
......
......@@ -16,18 +16,37 @@ _install-kernel:
install-kernel: _install-kernel version
define rsynclite
mkdir -p $(2) ; \
for f in $$(find $$(realpath $(1)) -mindepth 1 -maxdepth 1); do \
ln -s $$f $(2) ; \
done ; \
rm $(2)/api ; \
mkdir $(2)/api ; \
for f in $$(find $$(realpath $(1)/api) -mindepth 1 -maxdepth 1); do \
ln -s $$f $(2)/api ; \
done ; \
rm $(2)/api/contents ; \
mkdir $(2)/api/contents
endef
build: clean install-kernel
rm -rf build/lib/
python3 setup.py build
for f in version custom api/ kernelspecs/ examples/; do cp -r notebook/$$f build/lib/notebook/; done
mv build/lib/notebook/ build/lib/base/
mkdir build/lib/notebook/
# symlinks apps for each languages
for lang in $(languages); do \
$(call rsynclite,build/lib/notebook/,build/lib/$$lang) ; \
python3 basthon_renderer.py $$lang build/lib/$$lang/ ; \
done
# making links relatives
for lang in $(languages); do \
rsync -a --delete build/lib/base/ build/lib/notebook/$$lang ; \
python3 basthon_renderer.py $$lang build/lib/notebook/$$lang/ ; \
mv build/lib/$$lang build/lib/notebook/ ; \
symlinks -rc $$(realpath build/lib/notebook/$$lang) ; \
done
rsync -a build/lib/notebook/python3/ build/lib/notebook/
rsync -a build/lib/notebook/python3/ build/lib/notebook/python/
rsync -a build/lib/notebook/javascript/ build/lib/notebook/js/
python3 basthon_renderer.py python3 build/lib/notebook/
ln -s python3 build/lib/notebook/python
ln -s javascript build/lib/notebook/js
archives:
tar --exclude="*.htaccess" -czf basthon-notebook.tgz -C build/lib/notebook/ .
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment