Skip to content

Commit 5e985d6

Browse files
committed
feat: 1.0b3
1 parent d7c4fdc commit 5e985d6

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/release-published.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ jobs:
101101
sed -i.bak -E "s/^version = \"[^\"]+\"/version = \"${VER}\"/" crates/codex_native/Cargo.toml
102102
rm -f crates/codex_native/Cargo.toml.bak
103103
# Update Python __version__
104-
perl -0777 -pe 's/(\n__version__\s*=\s*\")[^"]*(\")/\1'"${VER}"'\2/s' -i codex/__init__.py
104+
# Use ${1}/${2} style backrefs to avoid `\11` ambiguity when VER starts with digits.
105+
perl -0777 -pe 's/(\n__version__\s*=\s*\")[^"]*(\")/${1}'"${VER}"'${2}/s' -i codex/__init__.py
105106
echo "Updated versions to ${VER}"
106107
107108
- name: Commit version bump

codex/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
WebSearchMode,
4040
)
4141
from codex.thread import Input, RunResult, RunStreamedResult, Thread, UserInput
42-
.0.0-beta.2"
42+
43+
__version__ = "1.0.0-beta.2"
4344

4445
__all__ = [
4546
"Codex",

tests/test_smoke.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from __future__ import annotations
22

3+
import re
4+
35
import codex
46
from codex import Codex, CodexOptions
57

68

79
def test_basic_import_and_api() -> None:
8-
assert codex.__version__ == "1.0.0"
10+
assert re.fullmatch(r"\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?", codex.__version__) is not None
911
assert Codex is codex.Codex
1012

1113

0 commit comments

Comments
 (0)