<commit_before># ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------------

param(
    [Parameter(Mandatory = $false, Position = 0)]
    [string] $buildConfig,
    [Parameter(Mandatory = $false, Position = 1)]
    [string] $scope,
    [Parameter(Mandatory = $false, Position = 2)]
    [string] $apiKey,
    [Parameter(Mandatory = $false, Position = 3)]
    [string] $repositoryLocation,
    [Parameter(Mandatory = $false, Position = 4)]
    [string] $nugetExe
)

function Get-TargetModules
{
	[CmdletBinding()]
	param
	(
      [string]$buildConfig,
	  [string]$Scope,
	  [bool]$PublishLocal
	)

	PROCESS 
	{
		$targets = @()
		$packageFolder = "$PSScriptRoot\..\src\Package"
        $resourceManagerRootFolder = "$packageFolder\$buildConfig\ResourceManager\AzureResourceManager"
		if (($Scope -eq 'All') -or $PublishLocal ) {
          $targets += "$resourceManagerRootFolder\AzureRM.Profile" 
        }

        if (($Scope -eq 'All') -or ($Scope -eq 'AzureStorage')) {
          $targets += "$packageFolder\$buildConfig\Storage\Azure.Storage"
        } 

        if (($Scope -eq 'All') -or ($Scope -eq 'ServiceManagement')) {
          $targets += "$packageFolder\$buildConfig\ServiceManagement\Azure"
        } 

        $resourceManagerModules = Get-ChildItem -Path $resourceManagerRootFolder -Directory
        if ($Scope -eq 'All') {  
          foreach ($module in $resourceManagerModules) {
            # filter out AzureRM.Profile which always gets published first 
            # And "Azure.Storage" which is built out as test dependencies  
            if (($module.Name -ne "AzureRM.Profile") -and ($module.Name -ne "Azure.Storage")) {
              $targets += $module.FullName
            }
          }
	  $targets += "$resourceManagerRootFolder\Azure.AnalysisServices" 
		  
        } elseif (($Scope -ne 'AzureRM') -and ($Scope -ne "ServiceManagement") -and ($Scope -ne "AzureStorage")) {
          $modulePath = Join-Path $resourceManagerRootFolder "AzureRM.$scope"
          if (Test-Path $modulePath) {
            $targets += $modulePath      
          } else {
            Write-Error "Can not find module with name $scope to publish"
          }
        }<commit_msg>Fix error with sign job not creating AzureRM module due to error<commit_after># ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------------

param(
    [Parameter(Mandatory = $false, Position = 0)]
    [string] $buildConfig,
    [Parameter(Mandatory = $false, Position = 1)]
    [string] $scope,
    [Parameter(Mandatory = $false, Position = 2)]
    [string] $apiKey,
    [Parameter(Mandatory = $false, Position = 3)]
    [string] $repositoryLocation,
    [Parameter(Mandatory = $false, Position = 4)]
    [string] $nugetExe
)

function Get-TargetModules
{
	[CmdletBinding()]
	param
	(
      [string]$buildConfig,
	  [string]$Scope,
	  [bool]$PublishLocal
	)

	PROCESS 
	{
		$targets = @()
		$packageFolder = "$PSScriptRoot\..\src\Package"
        $resourceManagerRootFolder = "$packageFolder\$buildConfig\ResourceManager\AzureResourceManager"
		if (($Scope -eq 'All') -or $PublishLocal ) {
          $targets += "$resourceManagerRootFolder\AzureRM.Profile" 
        }

        if (($Scope -eq 'All') -or ($Scope -eq 'AzureStorage')) {
          $targets += "$packageFolder\$buildConfig\Storage\Azure.Storage"
        } 

        if (($Scope -eq 'All') -or ($Scope -eq 'ServiceManagement')) {
          $targets += "$packageFolder\$buildConfig\ServiceManagement\Azure"
        } 

        $resourceManagerModules = Get-ChildItem -Path $resourceManagerRootFolder -Directory
        if ($Scope -eq 'All') {  
          foreach ($module in $resourceManagerModules) {
            # filter out AzureRM.Profile which always gets published first 
            # And "Azure.Storage" which is built out as test dependencies  
            if (($module.Name -ne "AzureRM.Profile") -and ($module.Name -ne "Azure.Storage")) {
              $targets += $module.FullName
            }
          }
		  
        } elseif (($Scope -ne 'AzureRM') -and ($Scope -ne "ServiceManagement") -and ($Scope -ne "AzureStorage")) {
          $modulePath = Join-Path $resourceManagerRootFolder "AzureRM.$scope"
          if (Test-Path $modulePath) {
            $targets += $modulePath      
          } else {
            Write-Error "Can not find module with name $scope to publish"
          }
        }
{'fraction_non_alphanumeric': 0.17048034934497816, 'fraction_numerical': 0.0031441048034934497, 'mean_word_length': 2.3002881844380405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5291709', 'n_tokens_mistral': 1546, 'n_tokens_neox': 1486, 'n_words': 465}