From eebda6568c91a1c437764ed665a7929aa04f294f Mon Sep 17 00:00:00 2001 From: Honnix Date: Mon, 11 Nov 2024 21:34:15 +0100 Subject: [PATCH] feat: Possible to skip cosign toolchains registration (#733) --- cosign/repositories.bzl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cosign/repositories.bzl b/cosign/repositories.bzl index 06673f96..e949c431 100644 --- a/cosign/repositories.bzl +++ b/cosign/repositories.bzl @@ -38,7 +38,7 @@ cosign_repositories = repository_rule( ) # Wrapper macro around everything above, this is the primary API -def cosign_register_toolchains(name): +def cosign_register_toolchains(name, register = True): """Convenience macro for users which does typical setup. - create a repository for each built-in platform like "cosign_linux_amd64" - @@ -57,7 +57,8 @@ def cosign_register_toolchains(name): platform = platform, cosign_version = COSIGN_VERSIONS.keys()[0], ) - native.register_toolchains("@{}//:{}_toolchain".format(toolchain_name, platform)) + if register: + native.register_toolchains("@{}//:{}_toolchain".format(toolchain_name, platform)) toolchains_repo( name = toolchain_name,