diff options
| author | Albin <albin@mullvad.net> | 2023-04-24 16:19:33 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2023-04-24 16:19:33 +0200 |
| commit | 1fbbf6517c9948c53689d2b1847c8adc2aa404ea (patch) | |
| tree | 0915f9b5de9c38b6641262f8546d7e2c586b9d1e /android/scripts/ci-android-xml.sh | |
| parent | c826091de45ae9af387472d24ecebb7ad5600fad (diff) | |
| parent | bc3bb75d1f0d7646b50e06a3e3bd8117c076e4f0 (diff) | |
| download | mullvadvpn-1fbbf6517c9948c53689d2b1847c8adc2aa404ea.tar.xz mullvadvpn-1fbbf6517c9948c53689d2b1847c8adc2aa404ea.zip | |
Merge branch 'restructure-tidy-script-droid-119'
Diffstat (limited to 'android/scripts/ci-android-xml.sh')
| -rw-r--r-- | android/scripts/ci-android-xml.sh | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/android/scripts/ci-android-xml.sh b/android/scripts/ci-android-xml.sh deleted file mode 100644 index 0fd552b3a6..0000000000 --- a/android/scripts/ci-android-xml.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# CI/Developer script to format -# Relies on Tidy - https://github.com/htacg/tidy-html5 - -# Autoformats Android XML files -function tidy-up-android-xml { - tidy -xml \ - -m \ - -i \ - -w 100 \ - -utf8 \ - --quiet yes \ - --indent-attributes yes \ - --indent-spaces 4 \ - --literal-attributes yes \ - android/app/src/main/AndroidManifest.xml \ - android/app/src/main/res/anim*/*.xml \ - android/app/src/main/res/drawable*/*.xml \ - android/app/src/main/res/layout*/*.xml \ - android/app/src/main/res/values/*.xml - - # FIXME - when tidy learns to not leave whitespace around, remove the line below - https://github.com/htacg/tidy-html5/issues/864 - find android/app/src/main/ -name '*.xml' -exec sed -i -e 's/[ \t]*$//' '{}' ';' -} - -# Autoformats Android XML files and returns 0 if no files were actually changed, or 1 if files were changed -function tidy-verify-xml { - tidy-up-android-xml - - if git diff --exit-code -- android/app/src/main/AndroidManifest.xml android/app/src/main/res; then - echo "Android XML files are correctly formatted" - return 0 - else - echo "android/app/src/main contains files that were changed, XML is not formatted properly" - return 1 - fi -} |
