mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
build: Update pyproject.toml to exclude additional website files
This commit is contained in:
parent
458864be45
commit
d5f59d72e4
2 changed files with 13 additions and 16 deletions
|
@ -49,8 +49,16 @@ include = ["aider*", "aider.website"]
|
||||||
[tool.setuptools.exclude-package-data]
|
[tool.setuptools.exclude-package-data]
|
||||||
"aider.website" = [
|
"aider.website" = [
|
||||||
# [[[cog
|
# [[[cog
|
||||||
# print("\n".join(f' "{pat}",' for pat in exclude_website_pats))
|
# cog.out("\n".join(f' "{pat}",' for pat in exclude_website_pats))
|
||||||
# ]]]
|
# ]]]
|
||||||
|
"examples/**",
|
||||||
|
"_posts/**",
|
||||||
|
"HISTORY.md",
|
||||||
|
"docs/benchmarks*md",
|
||||||
|
"docs/ctags.md",
|
||||||
|
"docs/unified-diffs.md",
|
||||||
|
"docs/leaderboards/index.md",
|
||||||
|
"assets/**",
|
||||||
# [[[end]]]
|
# [[[end]]]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -12,22 +12,11 @@ from packaging import version
|
||||||
|
|
||||||
|
|
||||||
def check_cog_pyproject():
|
def check_cog_pyproject():
|
||||||
with tempfile.NamedTemporaryFile(mode="w+", delete=False) as temp_file:
|
result = subprocess.run(["cog", "--check", "pyproject.toml"], capture_output=True, text=True)
|
||||||
with open("pyproject.toml", "r") as original_file:
|
|
||||||
temp_file.write(original_file.read())
|
|
||||||
|
|
||||||
result = subprocess.run(["cog", "-r", "pyproject.toml"], capture_output=True, text=True)
|
|
||||||
|
|
||||||
if result.returncode != 0:
|
if result.returncode != 0:
|
||||||
print("Error: cog -r pyproject.toml failed with the following output:")
|
print("Error: cog --check pyproject.toml failed, updating.")
|
||||||
print(result.stderr)
|
subprocess.run(["cog", "-r", "pyproject.toml"])
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if not filecmp.cmp("pyproject.toml", temp_file.name):
|
|
||||||
print(
|
|
||||||
"Error: cog -r pyproject.toml has changed the file. Please run cog -r pyproject.toml"
|
|
||||||
" and commit the changes."
|
|
||||||
)
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,10 +83,10 @@ def main():
|
||||||
dry_run = args.dry_run
|
dry_run = args.dry_run
|
||||||
|
|
||||||
# Perform checks before proceeding
|
# Perform checks before proceeding
|
||||||
|
check_cog_pyproject()
|
||||||
check_branch()
|
check_branch()
|
||||||
check_working_directory_clean()
|
check_working_directory_clean()
|
||||||
check_main_branch_up_to_date()
|
check_main_branch_up_to_date()
|
||||||
check_cog_pyproject()
|
|
||||||
|
|
||||||
new_version_str = args.new_version
|
new_version_str = args.new_version
|
||||||
if not re.match(r"^\d+\.\d+\.\d+$", new_version_str):
|
if not re.match(r"^\d+\.\d+\.\d+$", new_version_str):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue