Skip to content

Instantly share code, notes, and snippets.

@smirn0v
Created November 22, 2012 16:28
Show Gist options
  • Save smirn0v/4131984 to your computer and use it in GitHub Desktop.
Save smirn0v/4131984 to your computer and use it in GitHub Desktop.
Team City static analyzer
echo "##teamcity[compilationStarted compiler='scan-build']"
/Users/johann/checker-269/scan-build --status-bugs -k -v -v -o \
/Library/WebServer/Documents/ios-mail-reports/ \
xcodebuild -workspace MRAgent.xcodeproj/project.xcworkspace \
-scheme MRMail-Alpha TEST_AFTER_BUILD=NO \
clean build \
-configuration 'Release' 2>/dev/null | grep --line-buffered "Emitting reports for this run to" | sed "s/.*'\(.*\)'.*/\1/" > report_path
if [ "$?"-ne 0]; then
report_name=$(basename report_path)
echo "##teamcity[message text='Static analyzer found issue, see details at http://johann/ios-mail-reports/${report_name}' status='ERROR']Static analyzer found issue, see details at http://johann/ios-mail-reports/${report_name}";
echo "##teamcity[compilationFinished compiler='scan-build']"
exit 1
fi
echo "##teamcity[compilationFinished compiler='scan-build']"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment