File tree Expand file tree Collapse file tree 6 files changed +12
-8
lines changed
Expand file tree Collapse file tree 6 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ ENV PATH="/root/.local/bin/:$PATH"
2222
2323COPY pyproject.toml uv.lock README.md ./
2424COPY src src
25- RUN SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 uv sync --extra all
25+ RUN uv sync --extra all
2626
2727COPY docker/server/entrypoint.sh entrypoint.sh
2828RUN chmod 777 entrypoint.sh
Original file line number Diff line number Diff line change @@ -45,14 +45,14 @@ Changelog = "https://github.com/dstackai/dstack/releases"
4545Discord = " https://discord.gg/u8SmfwPpMd"
4646
4747[build-system ]
48- requires = [" hatchling" , " hatch-vcs " , " hatch- fancy-pypi-readme" ]
48+ requires = [" hatchling" , " hatch-fancy-pypi-readme" ]
4949build-backend = " hatchling.build"
5050
5151[project .scripts ]
5252dstack = " dstack._internal.cli.main:main"
5353
5454[tool .hatch .version ]
55- source = " vcs "
55+ path = " src/dstack/version.py "
5656
5757[tool .hatch .version .raw-options ]
5858version_scheme = " no-guess-dev"
Original file line number Diff line number Diff line change 11import os
22from argparse import Namespace
33
4- from dstack import version
4+ from dstack . _internal import settings
55from dstack ._internal .cli .commands import BaseCommand
66from dstack ._internal .core .errors import CLIError
77
@@ -78,7 +78,7 @@ def _command(self, args: Namespace):
7878 "dstack._internal.server.main:app" ,
7979 host = args .host ,
8080 port = args .port ,
81- reload = version . __version__ is None and not reload_disabled ,
81+ reload = settings . DSTACK_VERSION is None and not reload_disabled ,
8282 log_level = uvicorn_log_level ,
8383 workers = 1 ,
8484 )
Original file line number Diff line number Diff line change @@ -79,8 +79,7 @@ def _get_last_check_path() -> Path:
7979
8080
8181def check_for_updates ():
82- current_version = version .__version__
83- if current_version :
82+ if version .__is_release__ :
8483 if _is_last_check_time_outdated ():
8584 logger .debug ("Checking for updates..." )
8685 _check_version ()
Original file line number Diff line number Diff line change 33from dstack import version
44
55DSTACK_VERSION = os .getenv ("DSTACK_VERSION" , version .__version__ )
6+ if DSTACK_VERSION == "0.0.0" :
7+ # The build backend (hatching) requires not None for versions,
8+ # but the code currently treats None as dev version.
9+ # TODO: update the code to treat 0.0.0 as dev version.
10+ DSTACK_VERSION = None
611DSTACK_RELEASE = os .getenv ("DSTACK_RELEASE" ) is not None or version .__is_release__
712DSTACK_USE_LATEST_FROM_BRANCH = os .getenv ("DSTACK_USE_LATEST_FROM_BRANCH" ) is not None
813
Original file line number Diff line number Diff line change 1- __version__ = None
1+ __version__ = "0.0.0"
22__is_release__ = False
33base_image = "0.7"
You can’t perform that action at this time.
0 commit comments