chore: corregir clasificación estructural Android
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
name: Android structural type fix once
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'release/android-0.19.0-final-field-flow'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
fix:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: release/android-0.19.0-final-field-flow
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use server structural type code for mobile filtering
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
python - <<'PY'
|
||||
from pathlib import Path
|
||||
p = Path('android-app/app/src/main/java/com/korexlabs/dhinspeccion/ui/ModernVisitRoot.kt')
|
||||
text = p.read_text()
|
||||
old = ' return modernNormalize(type.typeName ?: type.name)\n'
|
||||
new = ' return modernNormalize(type.code.ifBlank { type.typeName ?: type.name })\n'
|
||||
if old not in text:
|
||||
raise SystemExit('modernItemTypeCode pattern not found')
|
||||
p.write_text(text.replace(old, new, 1))
|
||||
PY
|
||||
|
||||
- name: Commit fix and remove temporary workflow
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
git config user.name 'DH Android Finalizer'
|
||||
git config user.email 'android-finalizer@dhv2.local'
|
||||
git rm .github/workflows/android-structural-type-fix-once.yml
|
||||
git add android-app/app/src/main/java/com/korexlabs/dhinspeccion/ui/ModernVisitRoot.kt
|
||||
git commit -m 'fix(android): usar código estructural para Instalación y Subinstalación'
|
||||
git push origin HEAD:release/android-0.19.0-final-field-flow
|
||||
Reference in New Issue
Block a user