Skip to content

Commit 546147f

Browse files
authored
Merge pull request #278 from DecSmith42/fix/remove-bad-methods
feat(workflows): simplify artifact handling and remove redundant tasks
2 parents 3c4fd4d + e216990 commit 546147f

4 files changed

Lines changed: 8 additions & 95 deletions

File tree

.devops/workflows/Test_Devops_Build.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -277,42 +277,6 @@ jobs:
277277
artifact: DecSm.Atom.Tool-windows-latest
278278
path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool"
279279

280-
- task: DownloadPipelineArtifact@2
281-
displayName: DecSm.Atom.Tool
282-
inputs:
283-
artifact: DecSm.Atom.Tool-windows-11-arm
284-
path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool"
285-
286-
- task: DownloadPipelineArtifact@2
287-
displayName: DecSm.Atom.Tool
288-
inputs:
289-
artifact: DecSm.Atom.Tool-ubuntu-latest
290-
path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool"
291-
292-
- task: DownloadPipelineArtifact@2
293-
displayName: DecSm.Atom.Tool
294-
inputs:
295-
artifact: DecSm.Atom.Tool-ubuntu-24.04-arm
296-
path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool"
297-
298-
- task: DownloadPipelineArtifact@2
299-
displayName: DecSm.Atom.Tool
300-
inputs:
301-
artifact: DecSm.Atom.Tool-macos-15-intel
302-
path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool"
303-
304-
- task: DownloadPipelineArtifact@2
305-
displayName: DecSm.Atom.Tool
306-
inputs:
307-
artifact: DecSm.Atom.Tool-macos-latest
308-
path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool"
309-
310-
- task: DownloadPipelineArtifact@2
311-
displayName: DecSm.Atom.Tool
312-
inputs:
313-
artifact: DecSm.Atom.Tool-windows-latest
314-
path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool"
315-
316280
- task: DownloadPipelineArtifact@2
317281
displayName: DecSm.Atom.Tool
318282
inputs:

DecSm.Atom.Tests/ApiSurfaceTests/PublicApiSurfaceTests.VerifyPublicApiSurface.verified.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -451,12 +451,6 @@
451451
{
452452
Name: ConsumesArtifacts
453453
},
454-
{
455-
Name: ConsumesNoArtifacts
456-
},
457-
{
458-
Name: ConsumesNoVariables
459-
},
460454
{
461455
Name: ConsumesVariable
462456
},
@@ -514,12 +508,6 @@
514508
{
515509
Name: ProducesArtifacts
516510
},
517-
{
518-
Name: ProducesNoArtifacts
519-
},
520-
{
521-
Name: ProducesNoVariables
522-
},
523511
{
524512
Name: ProducesVariable
525513
},

DecSm.Atom/Build/Definition/TargetDefinition.cs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -298,17 +298,6 @@ public TargetDefinition ProducesArtifacts(IEnumerable<string> artifactName, stri
298298
return this;
299299
}
300300

301-
/// <summary>
302-
/// Clears all produced artifacts for the current target, ensuring it does not produce any artifacts.
303-
/// </summary>
304-
/// <returns>The current <see cref="TargetDefinition" /> for fluent chaining.</returns>
305-
public TargetDefinition ProducesNoArtifacts()
306-
{
307-
ProducedArtifacts.Clear();
308-
309-
return this;
310-
}
311-
312301
/// <summary>
313302
/// Declares an artifact that this target consumes.
314303
/// </summary>
@@ -377,17 +366,6 @@ public TargetDefinition ConsumesArtifacts(
377366
return this;
378367
}
379368

380-
/// <summary>
381-
/// Clears all consumed artifacts for the current target, ensuring it does not depend on any external artifacts.
382-
/// </summary>
383-
/// <returns>The current <see cref="TargetDefinition" /> for fluent chaining.</returns>
384-
public TargetDefinition ConsumesNoArtifacts()
385-
{
386-
ConsumedArtifacts.Clear();
387-
388-
return this;
389-
}
390-
391369
/// <summary>
392370
/// Declares a variable that this target produces.
393371
/// </summary>
@@ -403,17 +381,6 @@ public TargetDefinition ProducesVariable(string variableName)
403381
return this;
404382
}
405383

406-
/// <summary>
407-
/// Clears all produced variables for the current target, ensuring it does not produce any variables.
408-
/// </summary>
409-
/// <returns>The current <see cref="TargetDefinition" /> for fluent chaining.</returns>
410-
public TargetDefinition ProducesNoVariables()
411-
{
412-
ProducedVariables.Clear();
413-
414-
return this;
415-
}
416-
417384
/// <summary>
418385
/// Declares a variable that this target consumes.
419386
/// </summary>
@@ -426,15 +393,4 @@ public TargetDefinition ConsumesVariable(string targetName, string outputName)
426393

427394
return this;
428395
}
429-
430-
/// <summary>
431-
/// Clears all consumed variables for the current target, ensuring it does not depend on any external variables.
432-
/// </summary>
433-
/// <returns>The current <see cref="TargetDefinition" /> for fluent chaining.</returns>
434-
public TargetDefinition ConsumesNoVariables()
435-
{
436-
ConsumedVariables.Clear();
437-
438-
return this;
439-
}
440396
}

_atom/Targets/IDeployTargets.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ await PushPackageToNuget(
3737

3838
Target PushToNugetDevops =>
3939
d => d
40-
.Extends<IDeployTargets>(x => x.PushToNuget)
41-
.ConsumesNoArtifacts()
42-
.ConsumesArtifact(nameof(IBuildTargets.PackTool), Projects.DecSm_Atom_Tool.Name, DevopsPlatformNames);
40+
.DescribedAs("Pushes the packages to Nuget")
41+
.RequiresParam(nameof(NugetFeed))
42+
.RequiresParam(nameof(NugetApiKey))
43+
.ConsumesVariable(nameof(SetupBuildInfo), nameof(BuildId))
44+
.ConsumesArtifacts(nameof(IBuildTargets.PackProjects), IBuildTargets.ProjectsToPack)
45+
.ConsumesArtifact(nameof(IBuildTargets.PackTool), Projects.DecSm_Atom_Tool.Name, DevopsPlatformNames)
46+
.DependsOn(nameof(ITestTargets.TestProjects))
47+
.Executes(() => Logger.LogInformation("Simulating push to Nuget feed"));
4348

4449
Target PushToRelease =>
4550
d => d

0 commit comments

Comments
 (0)