fast-dev-cli 0.16.0__tar.gz → 0.16.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/PKG-INFO +1 -1
- fast_dev_cli-0.16.1/fast_dev_cli/__init__.py +1 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/fast_dev_cli/cli.py +6 -2
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/pyproject.toml +1 -1
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_bump.py +36 -0
- fast_dev_cli-0.16.0/fast_dev_cli/__init__.py +0 -1
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/LICENSE +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/README.md +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/fast_dev_cli/py.typed +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/pdm_build.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/scripts/check.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/scripts/format.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/scripts/test.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/__init__.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/conftest.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_fast_test.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_functions.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_lint.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_poetry_version_plugin.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_runserver.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_sync.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_tag.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_upgrade.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_upload.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/test_version.py +0 -0
- {fast_dev_cli-0.16.0 → fast_dev_cli-0.16.1}/tests/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.16.1"
|
|
@@ -190,9 +190,13 @@ def get_current_version(
|
|
|
190
190
|
work_dir = Project.get_work_dir()
|
|
191
191
|
package_name = re.sub(r"[- ]", "_", work_dir.name)
|
|
192
192
|
try:
|
|
193
|
-
|
|
193
|
+
installed_version = importlib_metadata.version(package_name)
|
|
194
194
|
except importlib_metadata.PackageNotFoundError:
|
|
195
|
-
|
|
195
|
+
...
|
|
196
|
+
else:
|
|
197
|
+
if installed_version != "0.0.0":
|
|
198
|
+
return installed_version
|
|
199
|
+
return read_version_from_file(package_name, work_dir)
|
|
196
200
|
|
|
197
201
|
cmd = ["poetry", "version", "-s"]
|
|
198
202
|
if verbose:
|
|
@@ -365,3 +365,39 @@ build-backend = "pdm.backend"
|
|
|
365
365
|
out = capture_cmd_output("fast bump patch")
|
|
366
366
|
assert str(version_file) in out
|
|
367
367
|
assert "0.3.1" in version_file.read_text()
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
def test_installed_version_is_0_0_0(tmp_work_dir):
|
|
371
|
+
project_name = "my-project"
|
|
372
|
+
package_name = "app"
|
|
373
|
+
Path(project_name).mkdir()
|
|
374
|
+
with chdir(project_name):
|
|
375
|
+
Path(package_name).mkdir()
|
|
376
|
+
version_file = Path(package_name, "__init__.py")
|
|
377
|
+
version_file.write_text('__version__ = "0.3.0"')
|
|
378
|
+
toml_file = Path("pyproject.toml")
|
|
379
|
+
toml_file.write_text("""
|
|
380
|
+
[project]
|
|
381
|
+
name = "my-project"
|
|
382
|
+
description = ""
|
|
383
|
+
authors = [{name="Waket Zheng", email="waketzheng@gmail.com"}]
|
|
384
|
+
readme = "README.md"
|
|
385
|
+
dynamic = ["version"]
|
|
386
|
+
keywords = []
|
|
387
|
+
requires-python = ">=3.9"
|
|
388
|
+
dependencies = []
|
|
389
|
+
|
|
390
|
+
[tool.pdm]
|
|
391
|
+
distribution = false
|
|
392
|
+
|
|
393
|
+
[tool.pdm.version]
|
|
394
|
+
source = "file"
|
|
395
|
+
path = "app/__init__.py"
|
|
396
|
+
|
|
397
|
+
[build-system]
|
|
398
|
+
requires = ["pdm-backend"]
|
|
399
|
+
build-backend = "pdm.backend"
|
|
400
|
+
""")
|
|
401
|
+
out = capture_cmd_output("fast bump patch")
|
|
402
|
+
assert str(version_file) in out
|
|
403
|
+
assert "0.3.1" in version_file.read_text()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.16.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|