Make cleaning optional if not building TestApps for UI test launch
This commit is contained in:
Родитель
f31e9d0e85
Коммит
fe5a8c32b1
|
@ -4,7 +4,7 @@
|
|||
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
UITEST_BUILD_DIR="$SCRIPT_DIR/../Tests/UITests/bin/Release"
|
||||
BUILD_SCRIPT="build.sh"
|
||||
BUILD_TARGET="TestApps"
|
||||
BUILD_TARGET="UITest"
|
||||
CLEAN_TARGET="clean"
|
||||
|
||||
# Built application files
|
||||
|
@ -79,12 +79,14 @@ fi
|
|||
|
||||
# Build tests
|
||||
pushd ..
|
||||
echo "Cleaning..."
|
||||
sh $BUILD_SCRIPT -t=$CLEAN_TARGET # clean so that we don't accidentally update to snapshot
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "An error occured while cleaning."
|
||||
popd
|
||||
exit 1
|
||||
if [ "${BUILD_TARGET}" == "TestApps" ]; then
|
||||
echo "Cleaning..."
|
||||
sh $BUILD_SCRIPT -t=$CLEAN_TARGET # clean so that we don't accidentally update to snapshot
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "An error occured while cleaning."
|
||||
popd
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "Building target \"$BUILD_TARGET\"..."
|
||||
sh $BUILD_SCRIPT -s "scripts/uitest.cake" -t=$BUILD_TARGET
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
// Task Target for build
|
||||
var Target = Argument("Target", Argument("t", "TestApps"));
|
||||
|
||||
Task("UITest").IsDependentOn("RestoreTestPackages").Does(() =>
|
||||
Task("UITest").Does(() =>
|
||||
{
|
||||
MSBuild("../Tests/UITests/Contoso.Forms.Test.UITests.csproj", c => c.Configuration = "Release");
|
||||
});
|
||||
|
||||
Task("TestApps").IsDependentOn("UITest").Does(() =>
|
||||
Task("TestApps").IsDependentOn("RestoreTestPackages").IsDependentOn("UITest").Does(() =>
|
||||
{
|
||||
// Build and package the test applications
|
||||
MSBuild("../Tests/iOS/Contoso.Forms.Test.iOS.csproj", settings => settings.SetConfiguration("Release")
|
||||
|
|
Загрузка…
Ссылка в новой задаче