mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
More miscellaneous cleanup
This commit is contained in:
parent
489d9f9926
commit
df40e862f4
33 changed files with 209 additions and 296 deletions
|
|
@ -34,7 +34,7 @@ def make_archive(name: str, repo: str, ref: str, destdir: str) -> str:
|
|||
:param text ref: Tag/SHA/branch to check out.
|
||||
:param text destdir: Directory to place archives in.
|
||||
"""
|
||||
output_path = os.path.join(destdir, name + '.tar.gz')
|
||||
output_path = os.path.join(destdir, f'{name}.tar.gz')
|
||||
with tmpdir() as tempdir:
|
||||
# Clone the repository to the temporary directory
|
||||
cmd_output_b('git', 'clone', repo, tempdir)
|
||||
|
|
@ -56,9 +56,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
|
|||
parser.add_argument('--dest', default='pre_commit/resources')
|
||||
args = parser.parse_args(argv)
|
||||
for archive_name, repo, ref in REPOS:
|
||||
output.write_line(
|
||||
f'Making {archive_name}.tar.gz for {repo}@{ref}',
|
||||
)
|
||||
output.write_line(f'Making {archive_name}.tar.gz for {repo}@{ref}')
|
||||
make_archive(archive_name, repo, ref, args.dest)
|
||||
return 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue