Created
November 8, 2022 00:40
-
-
Save micheltlutz/79d1ca330a7a128bc5e7769613532466 to your computer and use it in GitHub Desktop.
Exemplo de arquivo pre-commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
message="" | |
#---------------------------------------------------------------- | |
# BUILD XCODE PROJECT & VALIDATE | |
#---------------------------------------------------------------- | |
xcodebuild test -workspace MicroappArcExample.xcworkspace -scheme MicroappArcExample -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=16.1,name=iPhone 14' | |
if test $? -eq 0 | |
then echo -e "\033[1;32mOK: [Policy][✅] Passed build and unit tests.\033[0m" && exit 0 | |
else | |
message="[Policy][❌] Passed build or unit tests." | |
echo -e "\033[1;31mERROR: $message\033[0m"; | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment