fix(update): force version rebuild after upgrade to stop update loop

After make install, run uv sync --reinstall-package hate_crack so
setuptools-scm regenerates the version from the new git tag. Without
this, the installed version stays at the old value and the update
checker loops indefinitely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Justin Bollinger
2026-04-25 19:46:58 -04:00
co-authored by Claude Sonnet 4.6
parent 44167953ea
commit 894a565a7f
+8 -3
View File
@@ -967,11 +967,16 @@ def _run_upgrade():
raise SystemExit(1)
repo_root = git_root_result.stdout.strip()
import shutil
uv = shutil.which("uv") or os.path.expanduser("~/.local/bin/uv")
result = subprocess.run(
# git fetch --tags ensures new release tags are visible to setuptools-scm.
# make install handles system deps (transmission-daemon, p7zip) and
# reinstalls the Python package and CLI shim.
"git pull && git fetch --tags && make install",
# make install handles system deps and the CLI shim.
# uv sync --reinstall-package forces setuptools-scm to regenerate the
# version from the new tag so the version number updates correctly.
f"git pull && git fetch --tags && make install && {uv} sync --reinstall-package hate_crack",
shell=True,
cwd=repo_root,
)