File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1414logger = ColoredLogger ("PackagePublisher" )
1515
1616
17+ def extract_major_minor (version : str ) -> str :
18+ return "." .join (version .split ("." )[:2 ] + ["0" ])
19+
20+
1721def patch_version (version : str ):
1822 with open ("pyproject.toml" , "r" ) as f :
1923 pyproject = tomlkit .load (f )
@@ -22,7 +26,7 @@ def patch_version(version: str):
2226 for dep in list (pyproject ["tool" ]["poetry" ]["dependencies" ].keys ()):
2327 if dep .startswith ("polywrap-" ):
2428 pyproject ["tool" ]["poetry" ]["dependencies" ].pop (dep )
25- pyproject ["tool" ]["poetry" ]["dependencies" ].add (dep , f"^{ version } " )
29+ pyproject ["tool" ]["poetry" ]["dependencies" ].add (dep , f"^{ extract_major_minor ( version ) } " )
2630
2731 with open ("pyproject.toml" , "w" ) as f :
2832 tomlkit .dump (pyproject , f )
You can’t perform that action at this time.
0 commit comments