Commit 65aa3496 authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[releng] Factorized build process

parent fbb671670a1d
......@@ -50,6 +50,13 @@ Doing so, the minimal working versions of node.js and npm are:
* `node --version`: `v8.10.0`
* `npm --version`: `3.5.2`
## Run linters
```sh
cd extension
../cmd run linter
```
## How to use
This project contains a set of contributed views that must be served (by a web server) in order to be used.
......
......@@ -8,6 +8,9 @@ ROOT="$(dirname "$SCRIPT")"
VERSION=$(hg -R "$ROOT" id -n)
HASH=$(hg -R "$ROOT" --debug id -i)
# Cleanup
hg --config extensions.purge= -R "$ROOT" purge --all
echo ""
echo "=========================================="
echo "= Building @logilab/libview"
......
......@@ -3,21 +3,8 @@
SCRIPT="$(readlink -f "$0")"
ROOT="$(dirname "$SCRIPT")"
VERSION=$(hg -R "$ROOT" id -n)
HASH=$(hg -R "$ROOT" --debug id -i)
# Cleanup
hg --config extensions.purge= -R "$ROOT" purge --all
BUILDER=$(docker images | grep -o -E '^logilab/ld-build-env(\s)+latest' | wc -l)
if [ "$BUILDER" -lt "1" ]; then
echo "=> Build environment must be created"
"$ROOT/.releng/build-env.sh"
fi
# Execute the build
docker run -it --rm --user=$(id -u) --group-add=$(id -g) -v "$ROOT:/src" -e "HOME=/npm" "logilab/ld-build-env:latest" /src/build-src.sh
"$ROOT/cmd" /src/build-src.sh
# Build the new image
docker build --tag "logilab/ld-demo-views:latest" --rm --label changeset="$HASH" "$ROOT/views-logilab"
......@@ -22,4 +22,4 @@ case "$CD" in
;;
esac
docker run -it --rm --user=$(id -u) -v "$ROOT:/src" -e "HOME=/npm" -w "$WD" -p 8080:8080 "logilab/ld-build-env:latest" npm $@
docker run -it --rm --user=$(id -u) -v "$ROOT:/src" -e "HOME=/npm" -w "$WD" -p 8080:8080 "logilab/ld-build-env:latest" $@
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