Skip to content

Commit

Permalink
Not include *.autorest/*.psd1 (Azure#21278)
Browse files Browse the repository at this point in the history
* Not include *.autorest/*.psd1

* Not include *.autorest/*.psd1

* Not include *.autorest/*.psd1

* Not include *.autorest/*.psd1

* Not include *.autorest/*.psd1
  • Loading branch information
wyunchi-ms authored Mar 22, 2023
1 parent d7155ed commit eb2afb5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .azure-pipelines/SyncFromMainBranchConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"src/Az.Shared.props",
"src/Az.Test.props",
"src/Az.autorest.hybrid.props",
"src/Az.autorest.hybrid.v2.props",
"src/Az.autorest.props",
"src/Az.Post.props",
"src/psm1.props",
"NuGet.Config"
],
Expand Down
3 changes: 3 additions & 0 deletions src/Az.autorest.hybrid.props
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,20 @@
<ItemGroup>
<ModuleCustomFiles Include="$(MSBuildThisFileDirectory)$(PsRootModuleName)\$(PsModuleFolder)\custom\**\*.*"/>
<ModuleHelpFiles Include="$(MSBuildThisFileDirectory)$(PsRootModuleName)\$(PsModuleFolder)\help\**\*.*"/>
<ModuleGeneratedFiles Include="$(MSBuildThisFileDirectory)$(PsRootModuleName)\$(PsModuleFolder)\generated\**\*.*"/>
<ModuleTestFiles Include="$(MSBuildThisFileDirectory)$(PsRootModuleName)\$(PsModuleFolder)\test\**\*.*"/>
<UtilsFiles Include="$(MSBuildThisFileDirectory)$(PsRootModuleName)\$(PsModuleFolder)\utils\**\*.*"/>
</ItemGroup>

<Target Name="CopyFiles" AfterTargets="Build">
<Copy SourceFiles="Az.$(PsModuleName).psm1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)" />
<Copy SourceFiles="Az.$(PsModuleName).psd1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)" Condition="'$(Configuration)'=='Debug'"/>
<Copy SourceFiles="Az.$(PsModuleName).format.ps1xml" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)" />
<Copy SourceFiles="check-dependencies.ps1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)" Condition="'$(Configuration)'=='Debug'"/>
<Copy SourceFiles="test-module.ps1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)" Condition="'$(Configuration)'=='Debug'"/>
<Copy SourceFiles="@(ModuleCustomFiles)" DestinationFiles="@(ModuleCustomFiles->'$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)\custom\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ModuleHelpFiles)" DestinationFiles="@(ModuleHelpFiles->'$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)\help\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(ModuleGeneratedFiles)" DestinationFiles="@(ModuleGeneratedFiles->'$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)\generated\%(RecursiveDir)%(Filename)%(Extension)')" Condition="'$(Configuration)'=='Debug'"/>
<Copy SourceFiles="@(ModuleTestFiles)" DestinationFiles="@(ModuleTestFiles->'$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)\test\%(RecursiveDir)%(Filename)%(Extension)')" Condition="'$(Configuration)'=='Debug'"/>
<Copy SourceFiles="exports\ProxyCmdletDefinitions.ps1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)\exports" />
<Copy SourceFiles="internal\ProxyCmdletDefinitions.ps1" DestinationFolder="$(RepoArtifacts)$(Configuration)\Az.$(PsRootModuleName)\$(PsModuleFolder)\internal" Condition="Exists('internal\ProxyCmdletDefinitions.ps1')" />
Expand Down
2 changes: 1 addition & 1 deletion tools/CheckAssemblies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $DependencyMap = Import-Csv -Path $DependencyMapPath


.($PSScriptRoot + "\PreloadToolDll.ps1")
$ModuleManifestFiles = $ProjectPaths | ForEach-Object { Get-ChildItem -Path $_ -Filter "*.psd1" -Recurse | Where-Object { $_.FullName -like "*$($BuildConfig)*" -and `
$ModuleManifestFiles = $ProjectPaths | ForEach-Object { Get-Item "Az.*.psd1" | Where-Object { $_.FullName -like "*$($BuildConfig)*" -and `
$_.FullName -notlike "*Netcore*" -and `
$_.FullName -notlike "*dll-Help.psd1*" -and `
(-not [Tools.Common.Utilities.ModuleFilter]::IsAzureStackModule($_.FullName)) } }
Expand Down
2 changes: 1 addition & 1 deletion tools/NewOutputTypeIndex.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ param(
)

# Get all psd1 files
$psd1Files = Get-Childitem $PSScriptRoot\..\artifacts\$BuildConfig -Recurse | where {$_.Name -like "*.psd1" }
$psd1Files = Get-Item $PSScriptRoot\..\artifacts\$BuildConfig\Az.*\Az.*.psd1

$profilePsd1 = $psd1Files | Where-Object {$_.Name -like "*Az.Accounts.psd1"}
Import-LocalizedData -BindingVariable "psd1File" -BaseDirectory $profilePsd1.DirectoryName -FileName $profilePsd1.Name
Expand Down
2 changes: 1 addition & 1 deletion tools/TestModuleLoading.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $env:PSModulePath += "$pathDelimiter$outputDir/"
Write-Warning "PSModulePath: $env:PSModulePath"

$success = $true
foreach($psd1FilePath in Get-ChildItem -Path $outputDir -Recurse -Filter *.psd1) {
foreach($psd1FilePath in Get-Item "$outputDir/Az.*/Az.*.psd1") {
$manifestError = $null
Test-ModuleManifest -Path $psd1FilePath.FullName -ErrorVariable manifestError
if($manifestError){
Expand Down
2 changes: 1 addition & 1 deletion tools/UpdateModules.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function New-ModulePsm1 {
PROCESS {
$manifestDir = Get-Item -Path $ModulePath
$moduleName = $manifestDir.Name + ".psd1"
$manifestPath = Get-ChildItem -Path $manifestDir -Filter $moduleName -Recurse
$manifestPath = (Get-Item "$manifestDir/$moduleName").FullName
$file = Get-Item $manifestPath
Import-LocalizedData -BindingVariable ModuleMetadata -BaseDirectory $file.DirectoryName -FileName $file.Name

Expand Down

0 comments on commit eb2afb5

Please sign in to comment.