File: build.sh

package info (click to toggle)
galera-4 26.4.25-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,968 kB
  • sloc: cpp: 133,534; ansic: 12,171; sh: 1,446; tcl: 51; makefile: 19
file content (21 lines) | stat: -rwxr-xr-x 642 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -eu

# This script must be erun from the top source directory.
# The purpose is to build the current source with the reasonably
# most recent compiler and strictest checks.
# Environment variables:
# BASE - which distribution to use for building
# CC, CXX compilers to use, e.g.:
#
# $ CC=clang CXX=clang++ ./scripts/docker/build.sh
#

BASE=${BASE:='debian:testing-slim'}
CC=${CC:-'gcc'}
CXX=${CXX:-'g++'}

# tag under which the docker image will be created.
TAG="galera-builder-${BASE}"

docker buildx build -t ${TAG} --build-arg base=${BASE} $(dirname $0)
docker run --volume ${PWD}:/output --env CC=${CC} --env CXX=${CXX} ${TAG}