<commit_before>#!/bin/bash

set -e

#
# Required parameters
if [ -z "${project_path}" ] ; then
	echo "[!] Missing required input: project_path"
	exit 1
fi
if [ -z "${scheme}" ] ; then
	echo "[!] Missing required input: scheme"
	exit 1
fi

#
# Project-or-Workspace flag
if [[ "${project_path}" == *".xcodeproj" ]]; then
	export CONFIG_xcode_project_action="-project"
elif [[ "${project_path}" == *".xcworkspace" ]]; then
	export CONFIG_xcode_project_action="-workspace"
else
	echo "Failed to get valid project file (invalid project file): ${project_path}"
	exit 1
fi

#
# Print configs
echo
echo "========== Configs =========="
echo " * project_path: ${project_path}"
echo " * scheme: ${scheme}"
echo " * workdir: ${workdir}"
echo " * is_clean_build: ${is_clean_build}"
echo " * is_force_code_sign: ${is_force_code_sign}"
echo " * CONFIG_xcode_project_action: ${CONFIG_xcode_project_action}"


#
# Main
if [ ! -z "${workdir}" ] ; then
	echo
	echo "$ cd ${workdir}"
	cd "${workdir}"
fi

clean_build_param=''
if [[ "${is_clean_build}" == "yes" ]] ; then
	clean_build_param='clean'
fi


if [[ "${is_force_code_sign}" == "yes" ]] ; then
	echo " (!) Using Force Code Signing mode!"

	set -v
	xcodebuild ${CONFIG_xcode_project_action} "${project_path}" \
		-scheme "${scheme}" \
		${clean_build_param} analyze \
		-verbose \
		PROVISIONING_PROFILE="${BITRISE_PROVISIONING_PROFILE_ID}" \
		CODE_SIGN_IDENTITY="${BITRISE_CODE_SIGN_IDENTITY}"
else
	set -v
	xcodebuild ${CONFIG_xcode_project_action} "${project_path}" \
		-scheme "${scheme}" \
		${clean_build_param} analyze \
		-verbose
fi

exit 0<commit_msg>removed -verbose logging<commit_after>#!/bin/bash

set -e

#
# Required parameters
if [ -z "${project_path}" ] ; then
	echo "[!] Missing required input: project_path"
	exit 1
fi
if [ -z "${scheme}" ] ; then
	echo "[!] Missing required input: scheme"
	exit 1
fi

#
# Project-or-Workspace flag
if [[ "${project_path}" == *".xcodeproj" ]]; then
	export CONFIG_xcode_project_action="-project"
elif [[ "${project_path}" == *".xcworkspace" ]]; then
	export CONFIG_xcode_project_action="-workspace"
else
	echo "Failed to get valid project file (invalid project file): ${project_path}"
	exit 1
fi

#
# Print configs
echo
echo "========== Configs =========="
echo " * project_path: ${project_path}"
echo " * scheme: ${scheme}"
echo " * workdir: ${workdir}"
echo " * is_clean_build: ${is_clean_build}"
echo " * is_force_code_sign: ${is_force_code_sign}"
echo " * CONFIG_xcode_project_action: ${CONFIG_xcode_project_action}"


#
# Main
if [ ! -z "${workdir}" ] ; then
	echo
	echo "$ cd ${workdir}"
	cd "${workdir}"
fi

clean_build_param=''
if [[ "${is_clean_build}" == "yes" ]] ; then
	clean_build_param='clean'
fi


if [[ "${is_force_code_sign}" == "yes" ]] ; then
	echo " (!) Using Force Code Signing mode!"

	xcodebuild ${CONFIG_xcode_project_action} "${project_path}" \
		-scheme "${scheme}" \
		${clean_build_param} analyze \
		PROVISIONING_PROFILE="${BITRISE_PROVISIONING_PROFILE_ID}" \
		CODE_SIGN_IDENTITY="${BITRISE_CODE_SIGN_IDENTITY}"
else
	xcodebuild ${CONFIG_xcode_project_action} "${project_path}" \
		-scheme "${scheme}" \
		${clean_build_param} analyze
fi

exit 0
{'fraction_non_alphanumeric': 0.17461319861067257, 'fraction_numerical': 0.0025260498894853173, 'mean_word_length': 5.1875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2505563', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1132, 'n_words': 267}