Skip to content

Commit fbc1992

Browse files
committed
Merge branch 'main' into develop
2 parents 35a9d14 + 395d5ad commit fbc1992

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Publish
22
on:
33
push:
4-
branches: [main]
4+
tags:
5+
- "v*"
56
strategy:
67
matrix:
78
python-version: ["3.11"]
@@ -57,6 +58,12 @@ jobs:
5758
steps:
5859
- uses: actions/checkout@v4
5960

61+
- name: Update version from tag
62+
run: |
63+
# Strip 'v' prefix from tag and update version.py
64+
VERSION=${GITHUB_REF#refs/tags/v}
65+
echo "__version__ = \"${VERSION}\"" > mcp_shell_server/version.py
66+
6067
- name: Set up Python ${{ matrix.python-version }}
6168
uses: actions/setup-python@v5
6269
with:

mcp_shell_server/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from mcp.types import TextContent, Tool
88

99
from .shell_executor import ShellExecutor
10+
from .version import __version__
1011

1112
# Configure logging
1213
logging.basicConfig(level=logging.INFO)
@@ -116,7 +117,7 @@ async def call_tool(name: str, arguments: Any) -> Sequence[TextContent]:
116117

117118
async def main() -> None:
118119
"""Main entry point for the MCP shell server"""
119-
logger.info("Starting MCP shell server")
120+
logger.info(f"Starting MCP shell server v{__version__}")
120121
try:
121122
from mcp.server.stdio import stdio_server
122123

mcp_shell_server/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.0.0-dev"

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[project]
22
name = "mcp-shell-server"
3-
version = "0.1.0"
43
description = "MCP Shell Server - Execute shell commands via MCP protocol"
54
authors = [
65
{ name = "tumf" }
@@ -12,6 +11,7 @@ dependencies = [
1211
requires-python = ">=3.11"
1312
readme = "README.md"
1413
license = { text = "MIT" }
14+
dynamic = ["version"]
1515

1616
[project.scripts]
1717
mcp-shell-server = "mcp_shell_server:main"
@@ -62,4 +62,7 @@ target-version = ['py311']
6262

6363
[tool.isort]
6464
profile = "black"
65-
line_length = 88
65+
line_length = 88
66+
67+
[tool.hatch.version]
68+
path = "mcp_shell_server/version.py"

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)