Update .gitea/workflows/kibot.yml
This commit is contained in:
@@ -87,11 +87,11 @@ jobs:
|
||||
else
|
||||
# Create Python script to detect layers
|
||||
cat > /tmp/detect_layers.py << 'PYTHON_SCRIPT'
|
||||
#!/usr/bin/env python3
|
||||
import re
|
||||
import sys
|
||||
#!/usr/bin/env python3
|
||||
import re
|
||||
import sys
|
||||
|
||||
try:
|
||||
try:
|
||||
pcb_file = sys.argv[1]
|
||||
with open(pcb_file, 'r') as f:
|
||||
content = f.read()
|
||||
@@ -101,12 +101,12 @@ try:
|
||||
inner_layers = [l for l in copper_layers if 'In' in l and '.Cu' in l]
|
||||
total = 2 + len(inner_layers) # F.Cu + B.Cu + inner layers
|
||||
print(total)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print(2) # Default to 2 layers
|
||||
PYTHON_SCRIPT
|
||||
PYTHON_SCRIPT
|
||||
|
||||
chmod +x /tmp/detect_layers.py
|
||||
LAYERS=$(/tmp/detect_layers.py "$PCB_FILE")
|
||||
LAYERS=$(python3 /tmp/detect_layers.py "$PCB_FILE")
|
||||
echo "layers=$LAYERS" >> $GITHUB_OUTPUT
|
||||
echo "Auto-detected $LAYERS layer board"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user