mirror of
https://github.com/peridotbuild/pv2.git
synced 2024-11-25 14:41:27 +00:00
hotfix: add clean up
This commit is contained in:
parent
74f9117d36
commit
625e741a4b
@ -224,6 +224,7 @@ class SrpmImport(Import):
|
|||||||
# Raise an error if the tag already exists. Force the importer to tag
|
# Raise an error if the tag already exists. Force the importer to tag
|
||||||
# manually.
|
# manually.
|
||||||
if import_tag in repo_tags:
|
if import_tag in repo_tags:
|
||||||
|
shutil.rmtree(git_repo_path)
|
||||||
raise err.GitCommitError(f'Git tag already exists: {import_tag}')
|
raise err.GitCommitError(f'Git tag already exists: {import_tag}')
|
||||||
|
|
||||||
verify = repo.is_dirty()
|
verify = repo.is_dirty()
|
||||||
@ -231,11 +232,13 @@ class SrpmImport(Import):
|
|||||||
gitutil.commit(repo, commit_msg)
|
gitutil.commit(repo, commit_msg)
|
||||||
ref = gitutil.tag(repo, import_tag, commit_msg)
|
ref = gitutil.tag(repo, import_tag, commit_msg)
|
||||||
gitutil.push(repo, ref=ref)
|
gitutil.push(repo, ref=ref)
|
||||||
|
shutil.rmtree(git_repo_path)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# The most recent commit is assumed to be tagged also. We will not
|
# The most recent commit is assumed to be tagged also. We will not
|
||||||
# push. Force the importer to tag manually.
|
# push. Force the importer to tag manually.
|
||||||
print('Nothing to push')
|
print('Nothing to push')
|
||||||
|
shutil.rmtree(git_repo_path)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user