Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ jobs:
run: |
name=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])")
version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
if [ -d oracle/*_mcp_server ]; then
if [ -f oracle_mcp_common/__init__.py ]; then
init_py_file=oracle_mcp_common/__init__.py
python -c 'from pathlib import Path; import re, sys; p = Path(sys.argv[1]); text = p.read_text(); text, count = re.subn(r"^__version__ = \".*\"$", f"__version__ = \"{sys.argv[2]}\"", text, flags=re.MULTILINE); assert count == 1, f"Expected exactly one __version__ in {p}, found {count}"; p.write_text(text)' "$init_py_file" "$version"
elif [ -d oracle/*_mcp_server ]; then
init_py_file=oracle/*_mcp_server/__init__.py
echo "\"\"\"\nCopyright (c) 2025, Oracle and/or its affiliates.\nLicensed under the Universal Permissive License v1.0 as shown at\nhttps://oss.oracle.com/licenses/upl.\n\"\"\"\n" > $$init_py_file; \
echo "__project__ = \"$name\"" >> $init_py_file
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ _build:
name=$$(python -c "import tomllib; print(tomllib.load(open('$$dir/pyproject.toml', 'rb'))['project']['name'])"); \
version=$$(python -c "import tomllib; print(tomllib.load(open('$$dir/pyproject.toml', 'rb'))['project']['version'])"); \
echo "Building $$dir: $$name==$$version"; \
if [ -d $$dir/oracle/*_mcp_server ]; then \
if [ -f "$$dir/oracle_mcp_common/__init__.py" ]; then \
init_py_file="$$dir/oracle_mcp_common/__init__.py"; \
python -c 'from pathlib import Path; import re, sys; p = Path(sys.argv[1]); text = p.read_text(); text, count = re.subn(r"^__version__ = \".*\"$$", f"__version__ = \"{sys.argv[2]}\"", text, flags=re.MULTILINE); assert count == 1, f"Expected exactly one __version__ in {p}, found {count}"; p.write_text(text)' "$$init_py_file" "$$version"; \
elif [ -d $$dir/oracle/*_mcp_server ]; then \
init_py_file=$$(echo $$dir/oracle/*_mcp_server/__init__.py); \
printf '"""\nCopyright (c) 2025, 2026 Oracle and/or its affiliates.\nLicensed under the Universal Permissive License v1.0 as shown at\nhttps://oss.oracle.com/licenses/upl.\n"""\n\n' > $$init_py_file; \
echo "__project__ = \"$$name\"" >> $$init_py_file; \
Expand Down
7 changes: 7 additions & 0 deletions src/common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to `oracle-mcp-common` are documented in this file.

## Unreleased

### Fixed

- Build-time version metadata now synchronizes `oracle_mcp_common.__version__`
with the package version declared in `pyproject.toml`.

## 0.1.2

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/common/oracle_mcp_common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
]

__project__ = "oracle_mcp_common"
__version__ = "0.1.1"
__version__ = "0.1.2"