Skip to content

Commit 6c0caa3

Browse files
authored
feat: cleanup md and txt files on setup (#2)
1 parent affd43c commit 6c0caa3

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

setup_template.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,20 @@ def main() -> None:
284284
# Clean up
285285
print("\n🧹 Cleaning up...")
286286

287+
# Remove template-specific files that don't belong to the user's project
288+
cleanup_targets = [
289+
"CODE_OF_CONDUCT.md", # template repo's own conduct file
290+
"CONTRIBUTING.md", # template repo's own contributing guide
291+
"NOTICE", # Amazon's copyright notice for the template
292+
]
293+
for target in cleanup_targets:
294+
if os.path.exists(target):
295+
if os.path.isdir(target):
296+
shutil.rmtree(target)
297+
else:
298+
os.remove(target)
299+
print(f" ✓ Removed {target}")
300+
287301
# Remove this setup script
288302
script_path = os.path.abspath(__file__)
289303
if os.path.exists(script_path):

0 commit comments

Comments
 (0)