diff options
| author | Albin <albin@mullvad.net> | 2023-01-19 12:29:21 +0100 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2023-01-19 12:29:32 +0100 |
| commit | d709e7cfbbf67797c3c02eea6c16a99a6fe3e0db (patch) | |
| tree | fea3863353d458559232a02c76ec3395fb737585 /ci | |
| parent | 6699978cd5bfb411356a6534b9121533120d17f0 (diff) | |
| download | mullvadvpn-d709e7cfbbf67797c3c02eea6c16a99a6fe3e0db.tar.xz mullvadvpn-d709e7cfbbf67797c3c02eea6c16a99a6fe3e0db.zip | |
Move ci xml tidy script
Diffstat (limited to 'ci')
| -rw-r--r-- | ci/ci-android-xml.sh | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/ci/ci-android-xml.sh b/ci/ci-android-xml.sh deleted file mode 100644 index 1d7c46020a..0000000000 --- a/ci/ci-android-xml.sh +++ /dev/null @@ -1,37 +0,0 @@ -# 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 -} |
