diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index e8545e45bca..352117afc7f 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -139,7 +139,7 @@ extends: allowPackageConflicts: true - stage: 'Deploy_to_PsGallery' dependsOn: stage - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) # Only deploy to PSGallery on main branch + # condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) # Only deploy to PSGallery on main branch jobs: - deployment: 'DeployToPowerShellGallery' displayName: 'Deploy to PowerShell Gallery' @@ -162,6 +162,7 @@ extends: packagesToPush: '$(System.DefaultWorkingDirectory)/**/drop/**/*.nupkg' nuGetFeedType: external publishFeedCredentials: 'microsoftgraph PowerShell Gallery connection' + arguments: '-SkipDuplicate' - stage: PushDockerImageToRegistry condition: and(or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), not(contains(variables['Build.SourceBranch'], '-preview'))) diff --git a/tools/CmdletCheck.ps1 b/tools/CmdletCheck.ps1 new file mode 100644 index 00000000000..49bf18a0830 --- /dev/null +++ b/tools/CmdletCheck.ps1 @@ -0,0 +1,11 @@ +$CommandMetadataPath = (Join-Path $PSScriptRoot "..\src\Authentication\Authentication\custom\common\MgCommandMetadata.json") + +$CommandMetadata = Get-Content -Path $CommandMetadataPath | ConvertFrom-Json +$Counter = 0 +$CommandMetadata | ForEach-Object { + #If cmdlet method is a post or a patch add it to the counter + if ($_.Method -eq "DELETE") { + $Counter++ + } +} +Write-Host "Total number of cmdlets that are DELETE: $Counter" \ No newline at end of file