2023-02-10 14:04:00 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
export PATH="$PATH:/opt/homebrew/bin"
|
|
|
|
|
|
|
|
if ! swiftformat --lint . > /dev/null 2>&1
|
|
|
|
then
|
|
|
|
echo "pre-commit: Commit aborted due to SwiftFormat warnings. Please check the automatically generated fixes and try again"
|
|
|
|
swiftformat . > /dev/null 2>&1
|
|
|
|
exit 1
|
2023-02-13 14:53:01 +02:00
|
|
|
fi
|
|
|
|
|
2025-01-06 11:36:20 +00:00
|
|
|
swift-package-list ElementX.xcodeproj --requires-license --ignore-package compound-ios --ignore-package compound-design-tokens --ignore-package matrix-rich-text-editor-swift --output-type settings-bundle --output-path ElementX/SupportingFiles
|
2024-08-06 12:39:37 +01:00
|
|
|
if ! git diff --quiet -- ./ElementX/SupportingFiles/Settings.bundle || [ -n "$(git ls-files --others --exclude-standard -- ./ElementX/SupportingFiles/Settings.bundle)" ]; then
|
|
|
|
echo "pre-commit: Commit aborted due to unstaged changes to the package Acknowledgements."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-02-13 14:53:01 +02:00
|
|
|
./Tools/Scripts/validate_lfs.sh
|