11# Template helper to copy PowerShell scripts and all dependencies
22parameters :
3- helperLibsPath : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.PowershellSupport\bin\$(BuildConfiguration)\netstandard2.0 '
4- templatesPath : ' $(build .SourcesDirectory)\src\WinGet.RestSource.Infrastructure\bin\$(BuildConfiguration)'
3+ helperLibsPath : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.PowershellSupport\bin\$(BuildConfiguration)\netcoreapp3.1 '
4+ templatesPath : ' $(Build .SourcesDirectory)\src\WinGet.RestSource.Infrastructure\bin\$(BuildConfiguration)'
55
66steps :
77- task : CopyFiles@2
8- displayName : ' Copy Files: Powershell module '
8+ displayName : ' Copy Files: Powershell Module '
99 inputs :
10- SourceFolder : ' $(build .SourcesDirectory)\Tools\PowershellModule\src'
11- TargetFolder : ' $(build.artifactstagingdirectory )\Winget.PowerShell.Source'
10+ SourceFolder : ' $(Build .SourcesDirectory)\Tools\PowershellModule\src'
11+ TargetFolder : ' $(Build.ArtifactStagingDirectory )\Winget.PowerShell.Source'
1212 CleanTargetFolder : true
1313 OverWrite : true
1414
15- - task : CopyFiles@2
16- displayName : ' Copy Files: Helper Libs x86'
17- inputs :
18- Contents : |
19- ${{ parameters.helperLibsPath }}\Microsoft.Extensions.Logging.Abstractions.dll
20- ${{ parameters.helperLibsPath }}\Microsoft.WinGet.PowershellSupport.dll
21- ${{ parameters.helperLibsPath }}\Microsoft.WinGet.RestSource.Utils.dll
22- ${{ parameters.helperLibsPath }}\Newtonsoft.Json.dll
23- ${{ parameters.helperLibsPath }}\System.ComponentModel.Annotations.dll
24- ${{ parameters.helperLibsPath }}\YamlDotNet.dll
25- ${{ parameters.helperLibsPath }}\WinGetUtilInterop.dll
26- ${{ parameters.helperLibsPath }}\runtimes\win-x86\native\WinGetUtil.dll
27- TargetFolder : ' $(build.artifactstagingdirectory)\Winget.PowerShell.Source\Library\HelperLib\x86'
28- OverWrite : true
29- flattenFolders : true
30-
31- - task : CopyFiles@2
32- displayName : ' Copy Files: Helper libs x64'
15+ # Publish Helper Libs - win-x86
16+ - task : DotNetCoreCLI@2
17+ displayName : ' Package Helper Libs: Portable'
3318 inputs :
34- Contents : |
35- ${{ parameters.helperLibsPath }}\Microsoft.Extensions.Logging.Abstractions.dll
36- ${{ parameters.helperLibsPath }}\Microsoft.WinGet.PowershellSupport.dll
37- ${{ parameters.helperLibsPath }}\Microsoft.WinGet.RestSource.Utils.dll
38- ${{ parameters.helperLibsPath }}\Newtonsoft.Json.dll
39- ${{ parameters.helperLibsPath }}\System.ComponentModel.Annotations.dll
40- ${{ parameters.helperLibsPath }}\YamlDotNet.dll
41- ${{ parameters.helperLibsPath }}\WinGetUtilInterop.dll
42- ${{ parameters.helperLibsPath }}\runtimes\win-x64\native\WinGetUtil.dll
43- TargetFolder : ' $(build.artifactstagingdirectory)\Winget.PowerShell.Source\Library\HelperLib\x64'
44- OverWrite : true
45- flattenFolders : true
19+ command : publish
20+ publishWebProjects : false
21+ projects : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.PowershellSupport\WinGet.RestSource.PowershellSupport.csproj'
22+ arguments : ' --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)\Winget.PowerShell.Source\Library --no-restore'
23+ zipAfterPublish : false
4624
4725- task : CopyFiles@2
4826 displayName : ' Copy Files: Arm Templates'
@@ -58,19 +36,19 @@ steps:
5836 ${{ parameters.templatesPath }}\**\frontdoor.json
5937 ${{ parameters.templatesPath }}\**\keyvault.json
6038 ${{ parameters.templatesPath }}\**\storageaccount.json
61- TargetFolder : ' $(build.artifactstagingdirectory )\Winget.PowerShell.Source\Library\ARMTemplate'
39+ TargetFolder : ' $(Build.ArtifactStagingDirectory )\Winget.PowerShell.Source\Library\ARMTemplate'
6240 OverWrite : true
6341 flattenFolders : true
6442
6543- task : CopyFiles@2
6644 displayName : ' Copy Files: azure function'
6745 inputs :
6846 SourceFolder : ' $(Build.ArtifactStagingDirectory)\WinGet.RestSource.Functions'
69- TargetFolder : ' $(build.artifactstagingdirectory )\Winget.PowerShell.Source\Library\RestAPI'
47+ TargetFolder : ' $(Build.ArtifactStagingDirectory )\Winget.PowerShell.Source\Library\RestAPI'
7048 OverWrite : true
7149
7250- task : PublishBuildArtifacts@1
7351 displayName : ' Publish Artifact: WinGet.RestSource-Winget.PowerShell.Source'
7452 inputs :
75- PathtoPublish : ' $(build.artifactstagingdirectory )\Winget.PowerShell.Source'
53+ PathtoPublish : ' $(Build.ArtifactStagingDirectory )\Winget.PowerShell.Source'
7654 ArtifactName : ' WinGet.RestSource-Winget.PowerShell.Source'
0 commit comments