mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
stamp the version with the current git hash
This commit is contained in:
parent
8887af5635
commit
9a24b3c6d0
2 changed files with 15 additions and 12 deletions
|
@ -1,22 +1,21 @@
|
|||
__version__ = "0.54.8-dev"
|
||||
|
||||
"""
|
||||
[[[cog
|
||||
"""[[[cog
|
||||
import subprocess
|
||||
|
||||
try:
|
||||
git_hash = subprocess.check_output(['git', 'rev-parse', '--short=7', 'HEAD'], universal_newlines=True).strip()
|
||||
git_hash = subprocess.check_output(
|
||||
['git', 'rev-parse', '--short=7', 'HEAD'],
|
||||
universal_newlines=True,
|
||||
).strip()
|
||||
except subprocess.CalledProcessError:
|
||||
git_hash = ""
|
||||
git_hash = None
|
||||
|
||||
print(f'git_hash = "{git_hash}"')
|
||||
]]]
|
||||
"""
|
||||
git_hash = "deadbee" # This line will be replaced by cog
|
||||
"""
|
||||
[[[end]]]
|
||||
"""
|
||||
cog.out(f'git_hash = "{git_hash}"')
|
||||
]]]"""
|
||||
git_hash = "3fcb9e2"
|
||||
"""[[[end]]]"""
|
||||
|
||||
if '-dev' in __version__:
|
||||
if "-dev" in __version__ and git_hash:
|
||||
xyz = __version__.split("-")[0]
|
||||
__version__ = xyz + "-dev+" + git_hash
|
||||
|
|
|
@ -21,3 +21,7 @@ cog $ARG \
|
|||
aider/website/docs/config/aider_conf.md \
|
||||
aider/website/docs/leaderboards/index.md \
|
||||
aider/website/docs/llms/other.md
|
||||
|
||||
|
||||
cog -r aider/__init__.py && git add aider/__init__.py && git commit -m "updating version hash"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue