Make cleaning optional if not building TestApps for UI test launch

This commit is contained in:
Guillaume Perrot 2017-12-19 16:46:09 -08:00
Родитель f31e9d0e85
Коммит fe5a8c32b1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 9C234D95CFD46DA9
2 изменённых файлов: 11 добавлений и 9 удалений

Просмотреть файл

@ -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")