Public Access
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbb264efc9 | ||
|
|
c97b249935 | ||
|
|
32b9a53151 | ||
|
|
ae68df63f1 |
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [0.35.6] - 2026-07-06
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Add delay before wiki verification to avoid race condition
|
||||||
|
|
||||||
|
## [0.35.5] - 2026-07-06
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Embed token in wiki clone URL for push auth
|
||||||
|
|
||||||
## [0.35.4] - 2026-07-06
|
## [0.35.4] - 2026-07-06
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ extra index and list devx in your dependencies:
|
|||||||
```toml
|
```toml
|
||||||
[project]
|
[project]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"devx>=0.35.4",
|
"devx>=0.35.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.pip]
|
[tool.pip]
|
||||||
@@ -101,8 +101,8 @@ pip install -e .
|
|||||||
```
|
```
|
||||||
|
|
||||||
> **Note:** If your project requires a specific devx version, pin it in
|
> **Note:** If your project requires a specific devx version, pin it in
|
||||||
> `dependencies` (for example, `"devx==0.35.4"`) or use a version constraint
|
> `dependencies` (for example, `"devx==0.35.6"`) or use a version constraint
|
||||||
> (for example, `"devx>=0.35.4,<0.36"`).
|
> (for example, `"devx>=0.35.6,<0.36"`).
|
||||||
|
|
||||||
### Optional extras
|
### Optional extras
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -74,14 +74,14 @@ Add devx to your `pyproject.toml` dependencies and configure the registry:
|
|||||||
```toml
|
```toml
|
||||||
[project]
|
[project]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"devx>=0.35.4",
|
"devx>=0.35.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.pip]
|
[tool.pip]
|
||||||
extra-index-url = "https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple"
|
extra-index-url = "https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple"
|
||||||
```
|
```
|
||||||
|
|
||||||
Pin a specific version if needed: `"devx==0.35.4"` or `"devx>=0.35.4,<0.36"`.
|
Pin a specific version if needed: `"devx==0.35.6"` or `"devx>=0.35.6,<0.36"`.
|
||||||
|
|
||||||
### Optional extras
|
### Optional extras
|
||||||
|
|
||||||
|
|||||||
@@ -48,12 +48,12 @@ Add devx to your `pyproject.toml`:
|
|||||||
```toml
|
```toml
|
||||||
[project]
|
[project]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"devx>=0.35.4",
|
"devx>=0.35.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
dev = [
|
dev = [
|
||||||
"devx>=0.35.4",
|
"devx>=0.35.6",
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
"""devx — reusable development and CI/CD tools for oblachno-oss projects."""
|
"""devx — reusable development and CI/CD tools for oblachno-oss projects."""
|
||||||
|
|
||||||
__version__ = "0.35.4"
|
__version__ = "0.35.6"
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ import os
|
|||||||
import re
|
import re
|
||||||
import subprocess # nosec B404
|
import subprocess # nosec B404
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
import click
|
import click
|
||||||
from dotenv import load_dotenv # pyright: ignore[reportMissingImports,reportUnknownVariableType]
|
from dotenv import load_dotenv # pyright: ignore[reportMissingImports,reportUnknownVariableType]
|
||||||
@@ -102,7 +104,10 @@ def get_wiki_clone_url(owner: str, repo: str, token: str) -> str:
|
|||||||
# Gitea wiki repos are at {clone_url}.wiki.git
|
# Gitea wiki repos are at {clone_url}.wiki.git
|
||||||
# Extract base URL from API URL
|
# Extract base URL from API URL
|
||||||
base = GITEA_API_URL.rsplit("/api/v1", 1)[0]
|
base = GITEA_API_URL.rsplit("/api/v1", 1)[0]
|
||||||
return f"{base}/{owner}/{repo}.wiki.git"
|
# Embed token in URL for both clone and push auth
|
||||||
|
# Format: https://token@host/owner/repo.wiki.git
|
||||||
|
parsed = urlparse(base)
|
||||||
|
return f"{parsed.scheme}://{token}@{parsed.hostname}/{owner}/{repo}.wiki.git"
|
||||||
|
|
||||||
|
|
||||||
def clone_wiki(wiki_url: str, dest: Path) -> bool:
|
def clone_wiki(wiki_url: str, dest: Path) -> bool:
|
||||||
@@ -305,6 +310,9 @@ def main(dry_run: bool, repo: str | None, verify: bool) -> None:
|
|||||||
|
|
||||||
# Verification
|
# Verification
|
||||||
if verify and not dry_run:
|
if verify and not dry_run:
|
||||||
|
if pushed:
|
||||||
|
click.echo(_("Waiting 5s for Gitea to process pushed commits..."))
|
||||||
|
time.sleep(5)
|
||||||
click.echo(_("\nVerifying wiki pages..."))
|
click.echo(_("\nVerifying wiki pages..."))
|
||||||
# Re-clone to verify
|
# Re-clone to verify
|
||||||
verify_dir = Path(tmpdir) / "verify"
|
verify_dir = Path(tmpdir) / "verify"
|
||||||
|
|||||||
@@ -323,6 +323,7 @@ class TestMain:
|
|||||||
assert result.exit_code == 0
|
assert result.exit_code == 0
|
||||||
mock_init.assert_called_once()
|
mock_init.assert_called_once()
|
||||||
|
|
||||||
|
@patch("devx.ci.sync_wiki.time.sleep")
|
||||||
@patch("devx.ci.sync_wiki.clone_wiki")
|
@patch("devx.ci.sync_wiki.clone_wiki")
|
||||||
@patch("devx.ci.sync_wiki.commit_and_push", return_value=True)
|
@patch("devx.ci.sync_wiki.commit_and_push", return_value=True)
|
||||||
@patch("devx.ci.sync_wiki.sync_files", return_value=(1, 0))
|
@patch("devx.ci.sync_wiki.sync_files", return_value=(1, 0))
|
||||||
@@ -331,6 +332,7 @@ class TestMain:
|
|||||||
mock_sync: MagicMock,
|
mock_sync: MagicMock,
|
||||||
mock_push: MagicMock,
|
mock_push: MagicMock,
|
||||||
mock_clone: MagicMock,
|
mock_clone: MagicMock,
|
||||||
|
mock_sleep: MagicMock,
|
||||||
tmp_path: Path,
|
tmp_path: Path,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
) -> None:
|
) -> None:
|
||||||
@@ -380,6 +382,7 @@ class TestMain:
|
|||||||
assert result.exit_code == 0
|
assert result.exit_code == 0
|
||||||
assert "No push needed" in result.output
|
assert "No push needed" in result.output
|
||||||
|
|
||||||
|
@patch("devx.ci.sync_wiki.time.sleep")
|
||||||
@patch("devx.ci.sync_wiki.clone_wiki", side_effect=[True, False])
|
@patch("devx.ci.sync_wiki.clone_wiki", side_effect=[True, False])
|
||||||
@patch("devx.ci.sync_wiki.commit_and_push", return_value=True)
|
@patch("devx.ci.sync_wiki.commit_and_push", return_value=True)
|
||||||
@patch("devx.ci.sync_wiki.sync_files", return_value=(1, 0))
|
@patch("devx.ci.sync_wiki.sync_files", return_value=(1, 0))
|
||||||
@@ -388,6 +391,7 @@ class TestMain:
|
|||||||
mock_sync: MagicMock,
|
mock_sync: MagicMock,
|
||||||
mock_push: MagicMock,
|
mock_push: MagicMock,
|
||||||
mock_clone: MagicMock,
|
mock_clone: MagicMock,
|
||||||
|
mock_sleep: MagicMock,
|
||||||
tmp_path: Path,
|
tmp_path: Path,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
) -> None:
|
) -> None:
|
||||||
@@ -404,6 +408,7 @@ class TestMain:
|
|||||||
assert result.exit_code != 0
|
assert result.exit_code != 0
|
||||||
assert "could not clone" in result.output
|
assert "could not clone" in result.output
|
||||||
|
|
||||||
|
@patch("devx.ci.sync_wiki.time.sleep")
|
||||||
@patch("devx.ci.sync_wiki.clone_wiki")
|
@patch("devx.ci.sync_wiki.clone_wiki")
|
||||||
@patch("devx.ci.sync_wiki.commit_and_push", return_value=True)
|
@patch("devx.ci.sync_wiki.commit_and_push", return_value=True)
|
||||||
@patch("devx.ci.sync_wiki.sync_files", return_value=(1, 0))
|
@patch("devx.ci.sync_wiki.sync_files", return_value=(1, 0))
|
||||||
@@ -412,6 +417,7 @@ class TestMain:
|
|||||||
mock_sync: MagicMock,
|
mock_sync: MagicMock,
|
||||||
mock_push: MagicMock,
|
mock_push: MagicMock,
|
||||||
mock_clone: MagicMock,
|
mock_clone: MagicMock,
|
||||||
|
mock_sleep: MagicMock,
|
||||||
tmp_path: Path,
|
tmp_path: Path,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user