@@ -80,7 +80,7 @@ publish: build
8080 uv run twine upload dist/*
8181
8282# Version bumping
83- VERSION_FILE := web3_mcp/__version__.py
83+ VERSION_FILE := src/ web3_mcp/__version__.py
8484
8585# Helper function to update version
8686define update_version
@@ -103,30 +103,30 @@ PATCH := $(shell echo $(VERSION_BASE) | cut -d. -f3)
103103
104104# Bump patch version (0.0.x)
105105bump-patch :
106- @current_version=$$(grep -o '".*"' $(VERSION_FILE ) | sed 's/"//g ' ) ; \
106+ @current_version=$$(grep -o '__version__ = ".*"' $(VERSION_FILE ) | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+ ' ) ; \
107107 IFS=' .' read -r major minor patch <<< " $$current_version" ; \
108108 new_patch=$$((patch + 1 ) ); \
109109 new_version=" $$ major.$$ minor.$$ new_patch" ; \
110110 echo " Updating version to $$ new_version" ; \
111- sed -i ' ' " s/$$ current_version/ $$ new_version/" $(VERSION_FILE )
111+ sed -i ' ' " s/__version__ = \" .* \" /__version__ = \" $$ new_version\" /" $(VERSION_FILE )
112112
113113# Bump minor version (0.x.0)
114114bump-minor :
115- @current_version=$$(grep -o '".*"' $(VERSION_FILE ) | sed 's/"//g ' ) ; \
115+ @current_version=$$(grep -o '__version__ = ".*"' $(VERSION_FILE ) | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+ ' ) ; \
116116 IFS=' .' read -r major minor patch <<< " $$current_version" ; \
117117 new_minor=$$((minor + 1 ) ); \
118118 new_version=" $$ major.$$ new_minor.0" ; \
119119 echo " Updating version to $$ new_version" ; \
120- sed -i ' ' " s/$$ current_version/ $$ new_version/" $(VERSION_FILE )
120+ sed -i ' ' " s/__version__ = \" .* \" /__version__ = \" $$ new_version\" /" $(VERSION_FILE )
121121
122122# Bump major version (x.0.0)
123123bump-major :
124- @current_version=$$(grep -o '".*"' $(VERSION_FILE ) | sed 's/"//g ' ) ; \
124+ @current_version=$$(grep -o '__version__ = ".*"' $(VERSION_FILE ) | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+ ' ) ; \
125125 IFS=' .' read -r major minor patch <<< " $$current_version" ; \
126126 new_major=$$((major + 1 ) ); \
127127 new_version=" $$ new_major.0.0" ; \
128128 echo " Updating version to $$ new_version" ; \
129- sed -i ' ' " s/$$ current_version/ $$ new_version/" $(VERSION_FILE )
129+ sed -i ' ' " s/__version__ = \" .* \" /__version__ = \" $$ new_version\" /" $(VERSION_FILE )
130130
131131# Bump beta version (x.x.x-beta)
132132bump-beta :
0 commit comments