I need to pull a version number from a file and us...
# development
p
I need to pull a version number from a file and use that in BUILD metadata. Has anyone looked into creating a BUILD file symbol like
env()
but pulling from a file instead of env vars? For python wheels, I have a plugin that injects the version using the
SetupKwargsRequest
hook. Adding special hooks like that to other plugins sounds painful. I'm hoping there's a more generic way to get file contents into target metadata.
b
I have this vague recollection of prior discussion around this, likely related to versioning stuff... but I can't find it now, so this isn't that helpful a response 😄
😄 1
p
It turns out I need more than just something from a file, so I went down the plugin hook route: https://github.com/pantsbuild/pants/pull/21822