DEV Community

Discussion on: Experimentations on Bazel: version.txt

Collapse
 
jacktoussaint profile image
Jack • Edited

Thank you for posting this. Can this version be passed as a parameter to a python wheel label within the build.bzl? I have a process where I generate a wheel using bazel and then a separate script to replace the wheel version with my git tag. I would like to remove the second step and let bazel pull the version.

Collapse
 
davidb31 profile image
David Bernard • Edited

I don't know, it depends how to generate the wheel. Maybe in the command that generate the wheel you can read the content of version.txt and use it as parameter, or to change the content of the config file you use to generate the wheel (eg: setup.py, pyptoject.toml,...)

PS if your question is "how to cinvert content of the file (like version.txt) into a parameter of a bazel function (from the caller side)?", Sorry I don't know. But I'm interested by the answer if you find it.