mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-03 04:26:20 -04:00
bazel: fill microservice version on devbuild
target (#1994)
* wip: fill microservice version on devbuild * fill microservice versin on `devbuild`
This commit is contained in:
parent
e6dbb13c6c
commit
c7457bd942
4 changed files with 21 additions and 0 deletions
|
@ -8,6 +8,9 @@
|
|||
lib=$(realpath @@BASE_LIB@@) || exit 1
|
||||
stat "${lib}" >> /dev/null || exit 1
|
||||
|
||||
yq=$(realpath @@YQ@@)
|
||||
stat "${yq}" >> /dev/null
|
||||
|
||||
# shellcheck source=../sh/lib.bash
|
||||
if ! source "${lib}"; then
|
||||
echo "Error: could not find import"
|
||||
|
@ -59,3 +62,12 @@ ln -sf "$(replace_prefix "${host_cache}" "${builder_cache}" "${upgrade_agent}")"
|
|||
ln -sf "$(replace_prefix "${host_cache}" "${builder_cache}" "${cdbg}")" "${workdir}/cdbg"
|
||||
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}')
|
||||
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
|
||||
echo "Microservice version updated to ${build_version} in constellation-conf.yaml"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue