mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-02 10:35:08 -05:00
bazel: used sed from nixpkgs (#2706)
This is required since sed on macos has different flags and may behave differently. Co-authored-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
parent
6db0318b2f
commit
4c8041d2cf
@ -91,6 +91,11 @@ nixpkgs_package(
|
||||
repository = "@nixpkgs",
|
||||
)
|
||||
|
||||
nixpkgs_package(
|
||||
name = "gnused",
|
||||
repository = "@nixpkgs",
|
||||
)
|
||||
|
||||
load("//nix/cc:nixpkgs_cc_libraries.bzl", "nixpkgs_cc_library_deps")
|
||||
|
||||
nixpkgs_cc_library_deps()
|
||||
|
@ -12,6 +12,7 @@ sh_template(
|
||||
"//terraform-provider-constellation:terraform_rc",
|
||||
"//terraform-provider-constellation:tf_provider",
|
||||
"//upgrade-agent/cmd:upgrade_agent_linux_amd64",
|
||||
"@gnused//:bin/sed",
|
||||
"@yq_toolchains//:resolved_toolchain",
|
||||
],
|
||||
substitutions = {
|
||||
@ -20,6 +21,7 @@ sh_template(
|
||||
"@@CLI@@": "$(rootpath //cli:cli_edition_host)",
|
||||
"@@CONTAINER_SUMS@@": "$(rootpath //bazel/release:container_sums)",
|
||||
"@@EDITION@@": "$(rootpath :devbuild_cli_edition)",
|
||||
"@@SED@@": "$(rootpath @gnused//:bin/sed)",
|
||||
"@@TERRAFORM_PROVIDER@@": "$(rootpath //terraform-provider-constellation:tf_provider)",
|
||||
"@@TERRAFORM_RC@@": "$(rootpath //terraform-provider-constellation:terraform_rc)",
|
||||
"@@UPGRADE_AGENT@@": "$(rootpath //upgrade-agent/cmd:upgrade_agent_linux_amd64)",
|
||||
|
@ -16,6 +16,8 @@ fi
|
||||
|
||||
yq=$(realpath @@YQ@@)
|
||||
stat "${yq}" >> /dev/null
|
||||
sed=$(realpath @@SED@@)
|
||||
stat "${sed}" >> /dev/null
|
||||
bootstrapper=$(realpath @@BOOTSTRAPPER@@)
|
||||
stat "${bootstrapper}" >> /dev/null
|
||||
upgrade_agent=$(realpath @@UPGRADE_AGENT@@)
|
||||
@ -70,7 +72,7 @@ TF_PROVIDER_DIR="${workdir}/terraform"
|
||||
mkdir -p "${TF_PROVIDER_DIR}"
|
||||
ln -sf "$(replace_prefix "${host_cache}" "${builder_cache}" "${terraform_provider}")" "${TF_PROVIDER_DIR}/terraform-provider-constellation"
|
||||
cp "$(replace_prefix "${host_cache}" "${builder_cache}" "${terraform_rc}")" "${TF_PROVIDER_DIR}/config.tfrc"
|
||||
sed -i "s|@@TERRAFORM_PROVIDER_PATH@@|$(dirname "${terraform_provider}")|g" "${TF_PROVIDER_DIR}/config.tfrc"
|
||||
${sed} -i "s|@@TERRAFORM_PROVIDER_PATH@@|$(dirname "${terraform_provider}")|g" "${TF_PROVIDER_DIR}/config.tfrc"
|
||||
|
||||
build_version=$("${cli}" version | grep ^Version: | awk '{print $2}')
|
||||
if [[ ! -f "${workdir}/constellation-conf.yaml" ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user