rebuild-image: save image to correctly named file.

This commit is contained in:
Tom Wilkie
2015-08-05 13:30:50 +00:00
parent 1a03e44817
commit 756fc41986

View File

@@ -16,12 +16,12 @@ rebuild() {
mkdir -p $CACHEDIR
rm $CACHEDIR/$IMAGENAME* || true
docker build -t $IMAGENAME $IMAGEDIR
docker save $IMAGENAME:latest > $CACHEDIR/image-$CIRCLE_SHA1
docker save $IMAGENAME:latest > $CACHEDIR/$IMAGENAME-$CIRCLE_SHA1
}
# Get the revision the cached image was build at
cached_image_rev() {
find $CACHEDIR -name '$IMAGENAME-*' -type f | sed 's/[^\-]*\-//'
find $CACHEDIR -name "$IMAGENAME-*" -type f | sed 's/[^\-]*\-//'
}
# Have there been any revision beween $1 and $2