MCPcopy Create free account
hub / github.com/Bytez-com/docs / main

Function main

sdk/python/deploy.py:27–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def main():
28 # Step 1: Delete /dist/* contents
29 shutil.rmtree("dist", ignore_errors=True)
30
31 # Step 2: Increment version in setup.py
32 setup_path = "setup.py"
33
34 with open(setup_path, "r") as file:
35 content = file.read()
36 current_version = re.search(
37 r"version=['\"](\d+\.\d+\.\d+)['\"]", content
38 ).group(1)
39
40 new_version = increment_version(current_version)
41 update_version_in_file(setup_path, new_version)
42
43 # Step 3: Run sdist and bdist_wheel
44 subprocess.run(["python", "setup.py", "sdist", "bdist_wheel"], check=True)
45
46 # ensure your creds are in ~/.pypirc
47 # Step 4: Upload with twine
48 subprocess.run(
49 [
50 "python3",
51 "-m",
52 "twine",
53 "upload",
54 "dist/*",
55 ],
56 check=True,
57 )
58
59
60if __name__ == "__main__":

Callers 1

deploy.pyFile · 0.70

Calls 3

increment_versionFunction · 0.85
update_version_in_fileFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected