mirror of
https://github.com/stucki/docker-lineageos
synced 2025-01-09 17:39:47 -05:00
run.sh: Add FORCE_BUILD flag
This commit is contained in:
parent
92fa90f7f5
commit
92628eaa2c
3
run.sh
3
run.sh
@ -7,6 +7,7 @@ CCACHE=$(pwd)/ccache
|
|||||||
CONTAINER_HOME=/home/cmbuild
|
CONTAINER_HOME=/home/cmbuild
|
||||||
CONTAINER=cyanogenmod
|
CONTAINER=cyanogenmod
|
||||||
REPOSITORY=stucki/cyanogenmod
|
REPOSITORY=stucki/cyanogenmod
|
||||||
|
FORCE_BUILD=0
|
||||||
|
|
||||||
# Create shared folders
|
# Create shared folders
|
||||||
mkdir -p $SOURCE
|
mkdir -p $SOURCE
|
||||||
@ -17,7 +18,7 @@ IMAGE_EXISTS=$(docker images -q $REPOSITORY)
|
|||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "docker command not found"
|
echo "docker command not found"
|
||||||
exit $?
|
exit $?
|
||||||
elif [[ -z $IMAGE_EXISTS ]]; then
|
elif [[ -z $IMAGE_EXISTS ]] || [[ $FORCE_BUILD = 1 ]]; then
|
||||||
echo "Building Docker image $REPOSITORY..."
|
echo "Building Docker image $REPOSITORY..."
|
||||||
docker build --no-cache --rm -t $REPOSITORY .
|
docker build --no-cache --rm -t $REPOSITORY .
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user