Skip to content

Commit 874c970

Browse files
committed
💚 Check for variant Dockerfile before replacing text therein
1 parent 89059d3 commit 874c970

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.circleci/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ commands:
110110
if [[ -n "<< parameters.variant >>" ]]
111111
then
112112
DOCKERFILE="variant-<< parameters.variant >>.Dockerfile"
113-
sed -i "s|:latest|:${CIRCLE_BRANCH//\//_}|g" ${DOCKERFILE}
113+
if [[ -f ${DOCKERFILE} ]]
114+
then
115+
sed -i "s|:latest|:${CIRCLE_BRANCH//\//_}|g" ${DOCKERFILE}
116+
fi
114117
DOCKER_TARBALL="${DOCKER_TARBALL}-<< parameters.variant >>"
115118
VARIANT="-<< parameters.variant >>"
116119
echo "export DOCKERFILE=\"-f ${DOCKERFILE}\"" >> $BASH_ENV

0 commit comments

Comments
 (0)