()
| 9 | |
| 10 | |
| 11 | def get_git_commit_number(): |
| 12 | if not (Path(__file__).parent / '../.git').exists(): |
| 13 | return '0000000' |
| 14 | |
| 15 | cmd_out = subprocess.run(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE) |
| 16 | git_commit_number = cmd_out.stdout.decode('utf-8')[:7] |
| 17 | return git_commit_number |
| 18 | |
| 19 | |
| 20 | script_version = get_git_commit_number() |