From 8d660b4da151a3d48e4506a03dc322062e070574 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 30 Aug 2021 12:26:53 -0700 Subject: [PATCH] Styling --- .../stages/archetype-net-release.yml | 25 +++++++++---------- eng/scripts/InstallationCheck.ps1 | 4 +-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-net-release.yml b/eng/pipelines/templates/stages/archetype-net-release.yml index 5ade71b77fae2..200a78b5f670e 100644 --- a/eng/pipelines/templates/stages/archetype-net-release.yml +++ b/eng/pipelines/templates/stages/archetype-net-release.yml @@ -43,19 +43,18 @@ stages: dependsOn: Signing condition: and(succeeded(), ne(variables['SetDevVersion'], 'true'), ne(variables['Skip.Release'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-net-pr')) jobs: - - ${{if ne(artifact.skipPublishPackage, 'true')}}: - - job: InstallationCheck - displayName: "Installation Check" - steps: - - download: current - artifact: ${{parameters.ArtifactName}}-signed - - pwsh: - mkdir InstallationCheck - displayName: Create Testing Directory - - pwsh: | - $(System.DefaultWorkingDirectory)/eng/scripts/InstallationCheck.ps1 -ArtifactsDirectory ${{parameters.ArtifactName}} -Artifact ${{artifact.name}} -PipelineWorkspace $(Pipeline.Workspace) - displayName: Verify Package Installation - workingDirectory: $(System.DefaultWorkingDirectory)/InstallationCheck + - job: InstallationCheck + condition: ne('${{ artifact.skipPublishPackage }}', 'true') + displayName: "Installation Check" + steps: + - download: current + artifact: ${{parameters.ArtifactName}}-signed + - pwsh: mkdir InstallationCheck + displayName: Create Testing Directory + - pwsh: | + $(System.DefaultWorkingDirectory)/eng/scripts/InstallationCheck.ps1 -ArtifactsDirectory ${{parameters.ArtifactName}} -Artifact ${{artifact.name}} -PipelineWorkspace $(Pipeline.Workspace) + displayName: Verify Package Installation + workingDirectory: $(System.DefaultWorkingDirectory)/InstallationCheck - deployment: TagRepository displayName: "Create release tag" condition: ne(variables['Skip.TagRepository'], 'true') diff --git a/eng/scripts/InstallationCheck.ps1 b/eng/scripts/InstallationCheck.ps1 index 8f98d43f7ecbd..4e788bda379a2 100644 --- a/eng/scripts/InstallationCheck.ps1 +++ b/eng/scripts/InstallationCheck.ps1 @@ -12,10 +12,10 @@ param ( Write-Host "dotnet new console" dotnet new console $localFeed = "$PipelineWorkspace/$ArtifactsDirectory-signed/$Artifact" -Write-Host "dotnet nuget add source $($localFeed)" +Write-Host "dotnet nuget add source $localFeed" dotnet nuget add source $localFeed -$version = (Get-ChildItem "$($localFeed)/*.nupkg" -Exclude "*.symbols.nupkg" -Name).replace(".nupkg","").replace("$($Artifact).","") +$version = (Get-ChildItem "$localFeed/*.nupkg" -Exclude "*.symbols.nupkg" -Name).replace(".nupkg","").replace("$Artifact.","") Write-Host "dotnet add package $Artifact --version $version --no-restore" dotnet add package $Artifact --version $version --no-restore if ($LASTEXITCODE) {