1
0
mirror of https://github.com/stucki/docker-lineageos synced 2024-12-19 17:12:29 -05:00

Fix check if build is needed

This commit is contained in:
Michael Stucki 2015-04-03 19:58:10 +02:00
parent 6581eb9300
commit a352f54870
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased][unreleased]
### Fixed
- Fix check if build is needed
## [0.3.0] - 2015-03-31
### Added

4
run.sh
View File

@ -15,11 +15,11 @@ mkdir -p $SOURCE
mkdir -p $CCACHE
# Build image if needed
IMAGE_EXISTS=$(docker images $REPOSITORY | grep "$TAG")
IMAGE_EXISTS=$(docker images $REPOSITORY)
if [ $? -ne 0 ]; then
echo "docker command not found"
exit $?
elif [[ -z $IMAGE_EXISTS ]] || [[ $FORCE_BUILD = 1 ]]; then
elif [[ $FORCE_BUILD = 1 ]] || ! echo "$IMAGE_EXISTS" | grep -q "$TAG"; then
echo "Building Docker image $REPOSITORY:$TAG..."
docker build -t $REPOSITORY:$TAG .
fi