From 595a68e5e4d77408731bbb879313b9ebc8230b9f Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Mon, 3 Jul 2023 18:03:19 +0800 Subject: [PATCH] Update azure-pipelines.yml --- azure-pipelines.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e130d7b..58d6916 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -170,8 +170,16 @@ jobs: foreach ($projectFile in $projectFiles) { - echo "Pack command: dotnet " + (($arguments + $projectFile) -join ' ') - & dotnet ($arguments + $projectFile) + try + { + echo "Pack command: dotnet " + (($arguments + $projectFile) -join ' ') + & dotnet ($arguments + $projectFile) + } + catch + { + echo 'Failed to pack $(projectFile)' + exit 1 + } } $pushToAzureArtifacts = $pack @@ -208,4 +216,4 @@ jobs: nuGetFeedType: external publishFeedCredentials: LauXjpn-NugetOrg-EFCoreJet-AllPackages-PushNew packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg' - condition: eq(variables['Pack.PushToNugetOrg'],'true') \ No newline at end of file + condition: eq(variables['Pack.PushToNugetOrg'],'true')