Extract branch name from blender build

Hi folks!

Is there a way to extract information from within blender build about branch?
There is a “blender.exe -v” command, but it seems it doesn’t have such information.

bpy.app.build_branch will have the branch, if you need it from the command line something like

blender -b --python-expr "import bpy; print(bpy.app.build_branch)"

may work for you.

Of course! I forgot about such nice feature as --python-expr!

Big thanks for pointing out! :heart:

Do note that inclusion of build info is optional. For builds that don’t have it enabled it will return ‘Unknown’