Skip to content

Commit 71b48c9

Browse files
authored
Merge pull request #463 from lbedner/v0.5.3-rc2
v0.5.3-rc2
2 parents eaedb33 + 8a44009 commit 71b48c9

7 files changed

Lines changed: 35 additions & 21 deletions

File tree

CLAUDE.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Each generated project includes:
3232

3333
## Installation
3434

35-
**Current Version**: v0.5.3-rc1
35+
**Current Version**: v0.5.3-rc2
3636

3737
```bash
3838
pip install aegis-stack
@@ -67,6 +67,29 @@ This project uses `uv` for dependency management and a `Makefile` for CLI develo
6767

6868
**Template testing is critical** - always run `make test-template` after modifying templates to ensure generated projects work correctly.
6969

70+
### TestPyPI Release Testing
71+
Test upgrade paths using TestPyPI before publishing to PyPI:
72+
73+
```bash
74+
# 1. Install old version from TestPyPI and create project
75+
uvx --index-url https://test.pypi.org/simple/ \
76+
--extra-index-url https://pypi.org/simple/ \
77+
--index-strategy unsafe-best-match \
78+
aegis-stack@0.5.2 init test-upgrade-project
79+
80+
# 2. Install new RC version and test update
81+
cd test-upgrade-project
82+
uvx --index-url https://test.pypi.org/simple/ \
83+
--extra-index-url https://pypi.org/simple/ \
84+
--index-strategy unsafe-best-match \
85+
aegis-stack@0.5.3-rc2 update
86+
```
87+
88+
**Key uvx flags:**
89+
- `--index-url` - Primary source: TestPyPI
90+
- `--extra-index-url` - Fallback: PyPI (for dependencies not on TestPyPI)
91+
- `--index-strategy unsafe-best-match` - Allows mixing packages from different indexes
92+
7093
## Code Navigation (LSP-First)
7194

7295
Use the Language Server (Pyright) for code navigation instead of grep/glob:

aegis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Aegis Stack CLI - Component generation and project management tools.
33
"""
44

5-
__version__ = "0.5.3-rc1"
5+
__version__ = "0.5.3-rc2"

aegis/commands/update.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
format_conflict_report,
2323
get_changelog,
2424
get_current_template_commit,
25-
get_latest_version,
2625
get_template_root,
2726
is_version_downgrade,
2827
resolve_ref_to_commit,
@@ -158,14 +157,12 @@ def update_command(
158157
target_ref = resolve_version_to_ref(to_version, template_root)
159158
target_version_display = to_version
160159
else:
161-
# Default to latest release version (not HEAD, not prereleases)
162-
# Prereleases (rc, alpha, beta) are only picked up via explicit --to-version
163-
latest = get_latest_version(template_root)
164-
if latest:
165-
target_ref = f"v{latest}"
166-
target_version_display = f"{latest} (latest release)"
160+
# Default to CLI version - templates should match the installed CLI
161+
target_ref = resolve_version_to_ref(cli_version, template_root)
162+
if target_ref:
163+
target_version_display = f"{cli_version} (current CLI)"
167164
else:
168-
# Fallback to HEAD only if no versions found
165+
# Fallback to HEAD if CLI version tag doesn't exist
169166
target_ref = "HEAD"
170167
head_commit = resolve_ref_to_commit("HEAD", template_root)
171168
if head_commit:

copier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# - Update support
77

88
_min_copier_version: "9.0.0"
9-
_version: "0.5.3-rc1"
9+
_version: "0.5.3-rc2"
1010

1111
# IMPORTANT: Template content is in subdirectory
1212
# This allows the template to be recognized as git-tracked (aegis-stack repo root has .git)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "aegis-stack"
3-
version = "0.5.3-rc1"
3+
version = "0.5.3-rc2"
44
description = "A production-ready Python foundation for builders who refuse to wait. Try: uvx aegis-stack init my-project"
55
readme = "README.md"
66
requires-python = ">=3.11,<3.15"

tests/cli/test_update_command.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,14 @@ def test_dry_run_shows_preview(self, project_factory: "ProjectFactory") -> None:
176176
class TestUpdateCommandVersionResolution:
177177
"""Tests for version resolution logic."""
178178

179-
@patch("aegis.commands.update.get_latest_version")
180179
@patch("aegis.commands.update.resolve_version_to_ref")
181180
def test_update_to_latest_default(
182181
self,
183182
mock_resolve: MagicMock,
184-
mock_get_latest: MagicMock,
185183
project_factory: "ProjectFactory",
186184
) -> None:
187-
"""Test that update defaults to latest version."""
188-
# Setup mocks
189-
mock_get_latest.return_value = "0.2.0"
185+
"""Test that update defaults to CLI version."""
186+
# Setup mock - resolve_version_to_ref is called with CLI version
190187
mock_resolve.return_value = "v0.2.0"
191188

192189
# Use cached base project
@@ -810,17 +807,14 @@ def test_update_shows_current_and_target_versions(
810807
# Should show version information
811808
assert "version" in output or "template" in output
812809

813-
@patch("aegis.commands.update.get_latest_version")
814810
@patch("aegis.commands.update.get_current_template_commit")
815811
def test_update_shows_cli_version(
816812
self,
817813
mock_get_commit: MagicMock,
818-
mock_latest: MagicMock,
819814
project_factory: "ProjectFactory",
820815
) -> None:
821816
"""Test that update shows CLI version information."""
822817
mock_get_commit.return_value = "abc123"
823-
mock_latest.return_value = "0.2.0"
824818

825819
project_path = project_factory("base")
826820

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)