diff --git a/justfile b/justfile index 6d6e2e2..54ea4d3 100644 --- a/justfile +++ b/justfile @@ -9,6 +9,8 @@ release version: version="{{version}}" tag="v${version}" versionfile="internal/cli/root.go" + mcpversionfile="mcp/pyproject.toml" + mcplockfile="mcp/uv.lock" if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "error: '$version' is not valid semver (expected X.Y.Z)" >&2 @@ -28,22 +30,36 @@ release version: nix fmt - dirty="$(git status --porcelain -- ':!'"${versionfile}")" + dirty="$(git status --porcelain -- ':!'"${versionfile}" ':!'"${mcpversionfile}" ':!'"${mcplockfile}")" if [ -n "$dirty" ]; then - echo "error: working tree has changes outside ${versionfile}:" >&2 + echo "error: working tree has changes outside version files:" >&2 echo "$dirty" >&2 exit 1 fi - nix build - sed -i -E "s/^(\s*version\s*=\s*)\"[^\"]+\"/\1\"${version}\"/" "${versionfile}" if ! grep -qE "version\s*=\s*\"${version}\"" "${versionfile}"; then echo "error: failed to update version in ${versionfile}" >&2 exit 1 fi - git add "${versionfile}" + sed -i -E "s/^(version = )\"[^\"]+\"/\1\"${version}\"/" "${mcpversionfile}" + if ! grep -qFx "version = \"${version}\"" "${mcpversionfile}"; then + echo "error: failed to update version in ${mcpversionfile}" >&2 + exit 1 + fi + + (cd mcp && uv lock) + if ! grep -qFx "version = \"${version}\"" "${mcplockfile}"; then + echo "error: failed to update version in ${mcplockfile}" >&2 + exit 1 + fi + + nix build + nix build .#tgmcp + (cd mcp && uv run --locked pytest) + + git add "${versionfile}" "${mcpversionfile}" "${mcplockfile}" git commit -m "release: ${tag}" git tag -a "${tag}" -m "${tag}" git push upstream master "${tag}" diff --git a/mcp/pyproject.toml b/mcp/pyproject.toml index 31213d7..86e962a 100644 --- a/mcp/pyproject.toml +++ b/mcp/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "tgmcp" -version = "0.1.0" +version = "0.6.0" description = "A typed MCP server for the tg Tangled client" readme = "README.md" authors = [ diff --git a/mcp/uv.lock b/mcp/uv.lock index 295906a..e536b99 100644 --- a/mcp/uv.lock +++ b/mcp/uv.lock @@ -1080,7 +1080,7 @@ wheels = [ [[package]] name = "tgmcp" -version = "0.1.0" +version = "0.6.0" source = { editable = "." } dependencies = [ { name = "fastmcp" },