protected override CleanResult OnClean(CleanContext context) { var artifacts = context.GetBuildArtifact <DotsRuntimeBuildArtifact>(); if (artifacts == null) { return(context.Success()); } var buildDirectory = artifacts.OutputTargetFile.Directory; if (buildDirectory.Exists) { buildDirectory.Delete(true); } return(context.Success()); }
protected override CleanResult OnClean(CleanContext context) { var buildDirectory = context.GetOutputBuildDirectory(); if (Directory.Exists(buildDirectory)) { Directory.Delete(buildDirectory, true); } return(context.Success()); }
protected override CleanResult OnClean(CleanContext context) { var result = base.OnClean(context); if (result.Failed) { return(result); } ResolveBeeProjectRoot(context).DeleteIfExists(); return(context.Success()); }
protected override CleanResult OnClean(CleanContext context) { var result = context.GetBuildResult(); Assert.That(result, Is.Not.Null); Assert.That(result.Succeeded, Is.True); var artifact = context.GetBuildArtifact <TestBuildArtifactA>(); Assert.That(artifact, Is.Not.Null); Assert.Throws <NotSupportedException>(() => context.SetValue <TestBuildArtifactB>()); Assert.Throws <NotSupportedException>(() => context.RemoveValue <TestBuildArtifactB>()); return(result.Succeeded && artifact != null?context.Success() : context.Failure(nameof(artifact))); }
protected override CleanResult OnClean(CleanContext context) => context.Success();