bazel: use cache path to execute cli

This way it also works within the bazel container, where the symlinks
that are created won't work, as they are linking to host paths.

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-07-24 11:15:29 +02:00
parent 3796122cdb
commit 2d3999440d

View File

@ -63,11 +63,11 @@ ln -sf "$(replace_prefix "${host_cache}" "${builder_cache}" "${cdbg}")" "${workd
ln -sf "$(replace_prefix "${host_cache}" "${builder_cache}" "${container_sums}")" "${workdir}/container_sums.sha256"
ln -sf "$(replace_prefix "${host_cache}" "${builder_cache}" "${cli}")" "${workdir}/constellation"
build_version=$("${workdir}"/constellation version | grep ^Version: | awk '{print $2}')
build_version=$("${cli}" version | grep ^Version: | awk '{print $2}')
if [[ ! -f "${workdir}/constellation-conf.yaml" ]]; then
echo "constellation-conf.yaml not present in workspace"
echo "Build version: ${build_version}"
else
$yq -i eval ".microserviceVersion=\"${build_version}\"" ./constellation-conf.yaml
${yq} -i eval ".microserviceVersion=\"${build_version}\"" ./constellation-conf.yaml
echo "Microservice version updated to ${build_version} in constellation-conf.yaml"
fi