Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 0e6112d

Browse files
Fixed quotes in setup.py
1 parent ff21250 commit 0e6112d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
git_commit_hash = "latest"
1919

2020
try:
21-
git_commit_date = subprocess.check_output(['git', 'show', '-s', '--format=%cd', '--date=format:"%b %e %Y, %H:%M:%S"', 'HEAD']).decode('utf-8').strip()
21+
git_commit_date = subprocess.check_output(['git', 'show', '-s', '--format=%cd', '--date=format:"%b %e %Y, %H:%M:%S"', 'HEAD']).decode('utf-8').strip().removeprefix('"').removesuffix('"')
2222
except subprocess.CalledProcessError as e:
2323
git_commit_date = None
2424

25-
content = content.replace('git_release_tag = "latest"\ngit_commit_hash = "latest"\ngit_commit_date = None', f'git_release_tag = {repr(git_release_tag)}\ngit_commit_hash = {repr(git_commit_hash)}\ngit_commit_date = {repr(git_commit_date)}')
25+
print(f'git_release_tag = {repr(git_release_tag)}\ngit_commit_hash = {repr(git_commit_hash)}\ngit_commit_date = {repr(git_commit_date)}')
26+
27+
content = content.replace("git_release_tag = 'latest'\ngit_commit_hash = 'latest'\ngit_commit_date = None", f'git_release_tag = {repr(git_release_tag)}\ngit_commit_hash = {repr(git_commit_hash)}\ngit_commit_date = {repr(git_commit_date)}')
2628

2729
f.seek(0)
2830
f.write(content)

0 commit comments

Comments
 (0)