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:
parent
6581eb9300
commit
a352f54870
@ -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
4
run.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user