Skip to content

Commit 8387ce9

Browse files
committed
version controll
1 parent 7771ab9 commit 8387ce9

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
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/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"

0 commit comments

Comments
 (0)