File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,36 @@ stages:
6767 updateTasksVersion : true
6868 updateTasksVersionType : patch
6969 extensionVisibility : private
70+
71+ - task : PowerShell@2
72+ inputs :
73+ targetType : ' inline'
74+ script : |
75+ md _tmp
76+ md _output
77+
78+ Expand-Archive -Path $env:vsix -DestinationPath .\_tmp
79+ $manifest = gc .\_tmp\extension.vsomanifest | ConvertFrom-Json
80+
81+ foreach ($contribution in $manifest.contributions | ?{ $_.type -eq "ms.vss-distributed-task.task"})
82+ {
83+ $path = join-path -path ".\_tmp\" -childpath $contribution.properties.name
84+ $versions = Get-ChildItem -Attributes Directory -Path $path
85+ foreach ($version in $versions | %{$_.name})
86+ {
87+ $taskpath = join-path -path $path -childpath $version
88+ $taskmanifestPath = (join-path -path $taskpath -childpath "task.json")
89+ $taskManifest = gc $taskmanifestPath | ConvertFrom-Json -AsHashTable
90+ $taskName = $taskManifest.name
91+ $output = join-path -path ".\_output" -childpath "$taskName$($version.ToUpper()).zip"
92+
93+ Compress-Archive -Path $taskpath\* -DestinationPath $output
94+ }
95+ }
96+ pwsh : true
97+ workingDirectory : ' $(Build.SourcesDirectory)'
98+ env :
99+ vsix : ' $(Build.ArtifactStagingDirectory)\jessehouwing-vsts-variable-tasks.vsix'
70100
71101 - task : PublishPipelineArtifact@1
72102 displayName : ' Publish vsix'
You can’t perform that action at this time.
0 commit comments