()
| 31 | |
| 32 | |
| 33 | def get_commit_id(): |
| 34 | # check if git repository is clean |
| 35 | repo = git.Repo(cur_dir) |
| 36 | if repo.is_dirty(): |
| 37 | print('git repository is dirty, please commit first.') |
| 38 | sys.exit(1) |
| 39 | commit_id = repo.head.commit.hexsha[:10] |
| 40 | return commit_id |
| 41 | |
| 42 | |
| 43 | def prepare_setup(d): |