kt-event-marketing/convert-par-to-group.sh
2025-10-22 14:13:57 +09:00

53 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# PlantUML par/and/end를 group/end로 변환하는 스크립트
# PlantUML 서버가 par/and 문법을 지원하지 않으므로 group으로 대체
echo "Converting par/and/end blocks to group/end blocks..."
# Inner sequence files
cd design/backend/sequence/inner
for file in ai-트렌드분석및추천.puml content-이미지생성.puml distribution-다중채널배포.puml event-대시보드조회.puml; do
if [ -f "$file" ]; then
echo "Processing: $file"
# 1. Replace 'par' with 'group parallel'
sed -i.bak6 's/^ par$/ group parallel/' "$file"
sed -i.bak6 's/^par$/group parallel/' "$file"
# 2. Remove standalone 'and' lines (they don't exist in group syntax)
sed -i.bak6 '/^ and$/d' "$file"
sed -i.bak6 '/^and$/d' "$file"
echo " Converted: $file"
fi
done
cd - > /dev/null
# Outer sequence files
cd design/backend/sequence/outer
if [ -f "이벤트생성플로우.puml" ]; then
echo "Processing: 이벤트생성플로우.puml"
# 1. Replace 'par' with 'group parallel'
sed -i.bak6 's/^par$/group parallel/' "이벤트생성플로우.puml"
# 2. Remove standalone 'and' lines
sed -i.bak6 '/^and$/d' "이벤트생성플로우.puml"
echo " Converted: 이벤트생성플로우.puml"
fi
cd - > /dev/null
echo ""
echo "All par/and blocks converted to group blocks."
echo "Running validation..."
echo ""
# Run validation
./validate-puml-fixed.sh