()
| 50 | |
| 51 | |
| 52 | def get_hash(): |
| 53 | if os.path.exists('.git'): |
| 54 | sha = get_git_hash()[:7] |
| 55 | elif os.path.exists(version_file): |
| 56 | try: |
| 57 | from openselfsup.version import __version__ |
| 58 | sha = __version__.split('+')[-1] |
| 59 | except ImportError: |
| 60 | raise ImportError('Unable to get git version') |
| 61 | else: |
| 62 | sha = 'unknown' |
| 63 | |
| 64 | return sha |
| 65 | |
| 66 | |
| 67 | def write_version_py(): |
no test coverage detected