Skip to content

aherrmann/demo-bazel-detect-bzlmod-config-setting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A config setting to distinguish bzlmod and WORKSPACE mode.

$ bazel build demo && cat bazel-bin/demo.txt
...
workspace
$ bazel build demo --enable_bzlmod && cat bazel-bin/demo.txt
...
bzlmod

Where demo is defined as

write_file(
    name = "demo",
    out = "demo.txt",
    content = select({
        ":bzlmod": ["bzlmod"],
        ":workspace": ["workspace"],
    }),
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published