* chore(vagrant): initial vagrantfile * chore(vagrant): adding instructions after installation * chore(vagrant): Adding vagrant user to docker group * chore(vagrant): use local docker daemon for k3s * chore(vagrant): fix comment * chore(vagrant): adding hostname in /etc/hosts * chore(vagrant): fix doc * chore(vagrant): limiting cpu * chore(frontend): initialize dev env * chore(docker): adding dockerignore * chore(dockerfile): using cache for fasten build * chore(dockerignore): update * chore(docker): build optimizations * chore(build): all components build option * chore(build): utilities build fix * chore(scrpt): remove debug message * chore(vagrant): provision using stable branch always Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
27 lines
699 B
Bash
27 lines
699 B
Bash
#!/bin/bash
|
|
|
|
# Script to build api module
|
|
# flags to accept:
|
|
# ee: build for enterprise edition.
|
|
# Default will be OSS build.
|
|
|
|
# Usage: bash build.sh <ee>
|
|
|
|
git_sha1=$(git rev-parse HEAD)
|
|
ee="false"
|
|
check_prereq() {
|
|
which docker || {
|
|
echo "Docker not installed, please install docker."
|
|
exit=1
|
|
}
|
|
[[ exit -eq 1 ]] && exit 1
|
|
}
|
|
|
|
function build(){
|
|
# Run docker as the same user, else we'll run in to permission issues.
|
|
docker run --rm -v /etc/passwd:/etc/passwd -u `id -u`:`id -g` -v $(pwd):/home/${USER} -w /home/${USER} --name node_build node:14-stretch-slim /bin/bash -c "npm install && npm run build:oss"
|
|
echo "frotend build completed"
|
|
}
|
|
|
|
check_prereq
|
|
build $1
|