fix: no Python in container, reverting to awk

This commit is contained in:
2026-01-20 19:23:19 -05:00
parent 51703d45f8
commit 6283baf843

View File

@@ -20,22 +20,17 @@ jobs:
FORMATTED_LOC=$(printf "%'d" $LOC) FORMATTED_LOC=$(printf "%'d" $LOC)
echo "Syncing $FORMATTED_LOC lines..." echo "Syncing $FORMATTED_LOC lines..."
python3 -c " awk -v new_val="$FORMATTED_LOC" '
import os /.*/ {
content = open('README.md').read() sub(/.*/, "" new_val "")
marker_start = '' }
marker_end = '' { print }
if marker_start in content and marker_end in content: ' README.md > README.md.tmp && mv README.md.tmp README.md
before = content.split(marker_start)[0]
after = content.split(marker_end)[1] if [ $(wc -l < README.md) -lt 5 ]; then
new_content = before + marker_start + '$FORMATTED_LOC' + marker_end + after echo "ERROR: AWK output looks too small. Guarding against corruption."
with open('README.md', 'w') as f: exit 1
f.write(new_content) fi
print('Successfully updated README.')
else:
print('Markers not found!')
exit(1)
"
- name: Commit and Push - name: Commit and Push
run: | run: |