* do not dismiss views when application is resumed * prevents the PasswordNavigationViewController and PasswordDetailTableViewController from being dismissed when the app is put to the background and then brought back to the foreground * Instead, the PasswordEntities are re-fetched from the context by their path to handle the re-creation of the entities during an update process that could have run in the background * update SwiftLint to version 0.50.* * update SwiftFormat to 0.51.* --------- Co-authored-by: Mingshen Sun <bob@mssun.me>
25 lines
725 B
Bash
Executable file
25 lines
725 B
Bash
Executable file
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}"
|
|
SWIFTFORMAT_VERSION="0.51.*"
|
|
|
|
if [[ "${CI}" == "true" ]]; then
|
|
echo "Running in a Continuous Integration environment. Formatting is skipped."
|
|
exit 0
|
|
fi
|
|
|
|
if [[ "${CONFIGURATION}" == "Release" ]]; then
|
|
echo "Running during a release build. Formatting is skipped."
|
|
exit 0
|
|
fi
|
|
|
|
if which swiftformat > /dev/null; then
|
|
if [[ "$(swiftformat --version)" == $SWIFTFORMAT_VERSION ]]; then
|
|
swiftformat .
|
|
else
|
|
echo "Failure: SwiftFormat $SWIFTFORMAT_VERSION is required. Install it or update the build script to use a newer version."
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "Failure: SwiftFormat not installed. Get it via 'brew install swiftformat'."
|
|
exit 2
|
|
fi
|
|
|