docs: fix links for package publishing

pull/271/head
Bryce 1 year ago committed by Bryce Drennan
parent 9831d8a24a
commit c0c8e081b8

@ -1,4 +1,6 @@
import subprocess
import sys
from functools import lru_cache
from setuptools import find_packages, setup
@ -17,8 +19,19 @@ else:
entry_points = None
@lru_cache()
def get_git_revision_hash() -> str:
return subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii").strip()
revision_hash = get_git_revision_hash()
with open("README.md", encoding="utf-8") as f:
readme = f.read()
readme = readme.replace(
'<img src="',
f'<img src="https://raw.githubusercontent.com/brycedrennan/imaginAIry/{revision_hash}/',
)
setup(
name="imaginAIry",

Loading…
Cancel
Save