From 4f8297fd345dfee7a76ba05e73f2a2e0794f6ab0 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 23 Nov 2022 15:23:51 +0100 Subject: [PATCH] fix(ping/rust): Only specify branch when building master (#80) --- ping/rust/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ping/rust/Dockerfile b/ping/rust/Dockerfile index 238cdb5..655160c 100644 --- a/ping/rust/Dockerfile +++ b/ping/rust/Dockerfile @@ -11,7 +11,7 @@ ARG GIT_TARGET="" RUN if [ ! -z "${GIT_TARGET}" ]; then sed -i "s,^git.*,git = \"https://${GIT_TARGET}\"," ./plan/Cargo.toml; fi ARG GIT_REF="" -RUN if [ ! -z "${GIT_REF}" ]; then sed -i "s/^rev.*/branch = \"${GIT_REF}\"/" ./plan/Cargo.toml; fi +RUN if [ "master" = "${GIT_REF}" ]; then sed -i "s/^rev.*/branch= \"master\"/" ./plan/Cargo.toml; elif [ ! -z "${GIT_REF}" ]; then sed -i "s/^rev.*/rev = \"${GIT_REF}\"/" ./plan/Cargo.toml; fi # Build the requested binary: Cargo will update lockfile on changed manifest (i.e. if one of the above `sed`s patched it). ARG BINARY_NAME