chore: Remove temporary python scripts
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import os
|
||||
|
||||
for root, _, files in os.walk('.'):
|
||||
for f in files:
|
||||
if f == 'application-local.properties':
|
||||
p = os.path.join(root, f)
|
||||
try:
|
||||
content = open(p, encoding='utf-8').read()
|
||||
except Exception:
|
||||
content = open(p, encoding='cp949').read()
|
||||
|
||||
# Disable Kafka AutoConfiguration if not present
|
||||
if 'KafkaAutoConfiguration' not in content:
|
||||
content += '\n# Disable Kafka\nspring.autoconfigure.exclude=org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration\n'
|
||||
|
||||
with open(p, 'w', encoding='utf-8') as out:
|
||||
out.write(content)
|
||||
@@ -1,24 +0,0 @@
|
||||
import os
|
||||
import re
|
||||
|
||||
pattern = re.compile(r'name\s*=\s*"[^"]*",\s*description\s*=\s*"[^"]*",\s*group\s*=\s*"[^"]*",?\s*')
|
||||
|
||||
for root, _, files in os.walk('.'):
|
||||
for f in files:
|
||||
if f.endswith('.java'):
|
||||
p = os.path.join(root, f)
|
||||
try:
|
||||
content = open(p, encoding='utf-8').read()
|
||||
except Exception:
|
||||
content = open(p, encoding='cp949').read()
|
||||
|
||||
new_content = pattern.sub('', content)
|
||||
|
||||
# Clean up empty parens like @McpTool()
|
||||
new_content = new_content.replace('@McpTool(\n \n)', '@McpTool')
|
||||
new_content = new_content.replace('@McpTool()', '@McpTool')
|
||||
|
||||
if content != new_content:
|
||||
with open(p, 'w', encoding='utf-8') as out:
|
||||
out.write(new_content)
|
||||
print(f"Updated {p}")
|
||||
16
fix_props.py
16
fix_props.py
@@ -1,16 +0,0 @@
|
||||
import os
|
||||
|
||||
for root, _, files in os.walk('.'):
|
||||
for f in files:
|
||||
if f == 'application-local.properties':
|
||||
p = os.path.join(root, f)
|
||||
try:
|
||||
content = open(p, encoding='utf-8').read()
|
||||
except Exception:
|
||||
content = open(p, encoding='cp949').read()
|
||||
|
||||
content = content.replace('localhost:/', 'localhost:${server.port}/')
|
||||
content = content.replace('localhost:\n', 'localhost:${server.port}\n')
|
||||
|
||||
with open(p, 'w', encoding='utf-8') as out:
|
||||
out.write(content)
|
||||
@@ -1,17 +0,0 @@
|
||||
import os
|
||||
|
||||
for root, _, files in os.walk('.'):
|
||||
for f in files:
|
||||
if f == 'application-local.properties' or f == 'application.properties':
|
||||
p = os.path.join(root, f)
|
||||
try:
|
||||
content = open(p, encoding='utf-8').read()
|
||||
except Exception:
|
||||
content = open(p, encoding='cp949').read()
|
||||
|
||||
# Add logging level to suppress kafka warnings
|
||||
if 'logging.level.org.apache.kafka' not in content:
|
||||
content += '\n# Suppress Kafka Connection Logs\nlogging.level.org.apache.kafka=ERROR\n'
|
||||
|
||||
with open(p, 'w', encoding='utf-8') as out:
|
||||
out.write(content)
|
||||
Reference in New Issue
Block a user