11# .github/workflows/cd.yml
2- name : treemapper CD
2+ name : diffctx CD
33
44permissions : {}
55
6767 run : |
6868 CURRENT=$(python - <<'PY'
6969 import re
70- content = open('src/treemapper /version.py').read()
70+ content = open('src/diffctx /version.py').read()
7171 m = re.search(r'__version__\s*=\s*["\']([^"\']+)["\']', content)
7272 print(m.group(1) if m else '')
7373 PY
8787 import os, re, pathlib
8888 ver = os.environ["VERSION"]
8989
90- p = pathlib.Path("src/treemapper /version.py")
90+ p = pathlib.Path("src/diffctx /version.py")
9191 s = p.read_text(encoding="utf-8")
9292 s, n = re.subn(r'__version__\s*=\s*["\'].*?["\']', f'__version__ = "{ver}"', s, count=1)
9393 assert n == 1, "version.py: __version__ assignment not found"
@@ -100,7 +100,7 @@ jobs:
100100 py.write_text(s, encoding="utf-8")
101101 PY
102102 echo "version.py:"
103- cat src/treemapper /version.py
103+ cat src/diffctx /version.py
104104 echo "pyproject.toml (version line):"
105105 grep -E '^version\s*=' pyproject.toml
106106
@@ -111,7 +111,7 @@ jobs:
111111 run : |
112112 git config user.name "github-actions[bot]"
113113 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
114- git add src/treemapper /version.py pyproject.toml
114+ git add src/diffctx /version.py pyproject.toml
115115 if ! git diff --staged --quiet; then
116116 git commit -m "Release version ${VERSION}"
117117 else
@@ -203,7 +203,7 @@ jobs:
203203 git clone repo.bundle repo
204204 cd repo
205205 git checkout "$TAG_NAME"
206- cat src/treemapper /version.py
206+ cat src/diffctx /version.py
207207 grep -E '^version\s*=' pyproject.toml
208208
209209 - name : Set up Python
@@ -280,7 +280,7 @@ jobs:
280280 runs-on : ubuntu-latest
281281 environment :
282282 name : pypi
283- url : https://pypi.org/p/treemapper
283+ url : https://pypi.org/p/diffctx
284284 permissions :
285285 id-token : write
286286 steps :
@@ -343,32 +343,32 @@ jobs:
343343 python -m pip install --upgrade pip
344344 # Poll PyPI until the new version is installable. Up to 5 minutes.
345345 for attempt in 1 2 3 4 5 6 7 8 9 10; do
346- if python -m pip install "treemapper ==${VERSION}"; then
347- echo "Installed treemapper ${VERSION} on attempt $attempt"
346+ if python -m pip install "diffctx ==${VERSION}"; then
347+ echo "Installed diffctx ${VERSION} on attempt $attempt"
348348 break
349349 fi
350350 echo "PyPI not ready yet (attempt $attempt); sleeping 30s"
351351 sleep 30
352352 done
353- python -m pip show treemapper | grep -E '^(Name|Version)'
353+ python -m pip show diffctx | grep -E '^(Name|Version)'
354354
355- - name : Smoke - treemapper --version
356- run : treemapper --version
355+ - name : Smoke - diffctx --version
356+ run : diffctx --version
357357
358358 - name : Smoke - tree mapping mode
359359 shell : bash
360360 run : |
361361 mkdir -p smoke-tree && cd smoke-tree
362362 echo "print('hello')" > a.py
363363 echo "x = 1" > b.py
364- treemapper . --no-content > /dev/null
364+ diffctx . --no-content > /dev/null
365365 echo "OK: tree mode works"
366366
367367 - name : Smoke - Rust _diffctx is shipped
368368 shell : bash
369369 run : |
370370 python - <<'PY'
371- from treemapper ._diffctx import GitError, build_diff_context, count_tokens # noqa: F401
371+ from diffctx ._diffctx import GitError, build_diff_context, count_tokens # noqa: F401
372372 print("OK: _diffctx imported")
373373 PY
374374
@@ -385,7 +385,7 @@ jobs:
385385 git add -A && git commit -q -m "initial"
386386 printf 'def add(a, b):\n return a + b\n\ndef sub(a, b):\n return a - b\n' > pkg/util.py
387387 git add -A && git commit -q -m "add sub"
388- treemapper . --diff HEAD~1..HEAD --no-content
388+ diffctx . --diff HEAD~1..HEAD --no-content
389389 echo "OK: diff mode works (Rust extension present)"
390390
391391 finalize-release :
0 commit comments