Commit 9145b33c authored by Romain Casati's avatar Romain Casati
Browse files

Building version file is part of kernel install.

parent 844994d0
Pipeline #346656 passed with stages
in 6 minutes and 53 seconds
......@@ -4,8 +4,6 @@ pages:
script:
- apt-get update && apt-get -y install make python3 python3-setuptools python3-pip nodejs npm git tar zip
- make build
- make version
- mv version build/lib/notebook/
- make archives
- mv build/lib/notebook public
- mv basthon-notebook.{tgz,zip} public/
......
......@@ -2,21 +2,23 @@ all: build
clean:
python3 setup.py clean --all
rm -rf notebook/static/basthon-kernel/
rm -rf notebook/static/basthon-kernel/ notebook/version
install-kernel:
version:
echo $$(date -d @$$(git log -1 --format="%at") +%Y/%m/%d_%H:%M:%S)_kernel_$$(pip3 show basthon-kernel | grep Version | cut -f2 -d' ') > notebook/version
_install-kernel:
pip3 install --upgrade basthon-kernel
mkdir -p notebook/static/basthon-kernel/
cd notebook/static/basthon-kernel/ && python3 -m basthon-kernel --install && cd -
install-kernel: _install-kernel version
build: clean install-kernel
python3 setup.py build
for f in custom api/ kernelspecs/ basthon/; do cp -r notebook/$$f build/lib/notebook/; done
for f in version custom api/ kernelspecs/ basthon/; do cp -r notebook/$$f build/lib/notebook/; done
mv build/lib/notebook/basthon/* build/lib/notebook/
version:
echo $$(date -d @$$(git log -1 --format="%at") +%Y/%m/%d_%H:%M:%S)_kernel_$$(pip3 show basthon-kernel | grep Version | cut -f2 -d' ') > version
archives:
tar --exclude="*.htaccess" -czf basthon-notebook.tgz -C build/lib/notebook/ .
cd build/lib/notebook/ && zip --exclude "*.htaccess" -qr ../../../basthon-notebook.zip . && cd -
......@@ -24,4 +26,4 @@ archives:
test: build
bash -c "set -m ; python3 -m http.server --directory build/lib/notebook/ --bind localhost 8888 & sleep 1 ; firefox localhost:8888 ; fg %1"
.PHONY: clean build all test install-kernel archives version
.PHONY: clean build all test install-kernel _install-kernel archives version
Supports Markdown
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