MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / getGitBranchName

Function getGitBranchName

Scripts/BuildScripts/generate_build_scripts.py:29–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 return None
28
29def getGitBranchName():
30 print( 'Retrieving git branch name' )
31 process = subprocess.Popen( ['git', 'rev-parse', '--abbrev-ref', 'HEAD'], stdout=subprocess.PIPE )
32 (output, err) = process.communicate()
33 exitCode = process.wait()
34
35 if exitCode == 0:
36 output = output.decode()
37 branchName = output.replace( '\n', '' )
38 return branchName
39 else:
40 return None
41
42branchName = getMercurialBranchName()
43

Callers 1

Calls 2

waitMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected