Add support for run script input files.

This commit is contained in:
Filip Dolník 2016-06-15 13:02:49 +02:00
parent 82e97abce4
commit ea3fdefb4a
2 changed files with 9 additions and 2 deletions

View File

@ -343,13 +343,14 @@
files = (
);
inputPaths = (
"$(SRCROOT)/Tests/TestedProtocol.swift",
);
name = "Generate mocks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "./run generate --output \"$PROJECT_DIR/Tests/GeneratedMocks.swift\" \"$PROJECT_DIR/Tests/TestedProtocol.swift\" \"$PROJECT_DIR/Tests/TestedClass.swift\"";
shellScript = "./run generate --output \"$PROJECT_DIR/Tests/GeneratedMocks.swift\" \"$PROJECT_DIR/Tests/TestedClass.swift\"";
};
/* End PBXShellScriptBuildPhase section */

8
run
View File

@ -20,4 +20,10 @@ if [ ! -e $FILE_PATH ]; then
rm -rf Build
cd ../..
fi
$FILE_PATH/Contents/MacOS/cuckoo "$@"
INPUT_FILES=""
for (( i=0; i<SCRIPT_INPUT_FILE_COUNT; i++ ))
do
VARIABLE=SCRIPT_INPUT_FILE_${i}
INPUT_FILES+=" "${!VARIABLE}
done
$FILE_PATH/Contents/MacOS/cuckoo "$@" ${INPUT_FILES}