Build: show better "make update" error message when in detached HEAD state

This commit is contained in:
Brecht Van Lommel 2021-09-13 13:13:03 +02:00
parent b777df8080
commit 603ae580ce
1 changed files with 4 additions and 0 deletions

View File

@ -222,6 +222,10 @@ if __name__ == "__main__":
# Test if we are building a specific release version.
branch = make_utils.git_branch(args.git_command)
if branch == 'HEAD':
sys.stderr.write('Blender git repository is in detached HEAD state, must be in a branch\n')
sys.exit(1)
tag = make_utils.git_tag(args.git_command)
release_version = make_utils.git_branch_release_version(branch, tag)