Skip to content

Commit 8e77a9e

Browse files
committed
Start simplifying release build
This includes removing the file catalog steps entirely, as we presumably do not need it.
1 parent 1f20828 commit 8e77a9e

File tree

1 file changed

+11
-38
lines changed

1 file changed

+11
-38
lines changed

.vsts-ci/templates/release-general.yml

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -26,65 +26,37 @@ steps:
2626
inputs:
2727
downloadType: specific
2828

29+
# TODO: Use `ExtractFiles` task instead of script
2930
- task: PowerShell@1
3031
displayName: 'Extract build zip'
3132
inputs:
3233
scriptType: inlineScript
3334
inlineScript: |
34-
$dest = New-Item -ItemType Directory $env:BUILD_ARTIFACTSTAGINGDIRECTORY/release/out/PowerShellEditorServices
35+
$dest = New-Item -ItemType Directory $env:BUILD_ARTIFACTSTAGINGDIRECTORY/PowerShellEditorServices
3536
$psesZip = Get-ChildItem $env:BUILD_ARTIFACTSTAGINGDIRECTORY/PowerShellEditorServices-CI/PowerShellEditorServices*.zip -ErrorAction Stop
3637
$psesZip | Expand-Archive -DestinationPath $dest -Force -Verbose
3738
$psesZip | Remove-Item -Recurse -Force
3839
3940
- checkout: ComplianceRepo
4041

4142
- template: EsrpSign.yml@ComplianceRepo
42-
displayName: 'Sign the scripts and libraries'
4343
parameters:
44-
buildOutputPath: '$(Build.ArtifactStagingDirectory)'
44+
buildOutputPath: '$(Build.ArtifactStagingDirectory)/PowerShellEditorServices'
4545
signOutputPath: '$(Build.ArtifactStagingDirectory)/Signed'
4646
certificateId: 'CP-230012' # Authenticode certificate.
4747
useMinimatch: true
4848
pattern: |
4949
# PowerShellEditorServices Script
50-
release/out/PowerShellEditorServices/PowerShellEditorServices/*.{psd1,psm1,ps1xml}
51-
release/out/PowerShellEditorServices/PowerShellEditorServices/Commands/**/*.{psd1,psm1,ps1xml}
50+
PowerShellEditorServices/*.{ps1,psd1,psm1,ps1xml}
51+
PowerShellEditorServices/Commands/**/*.{ps1,psd1,psm1,ps1xml}
5252
# PowerShellEditorServices Binaries
53-
release/out/**/Microsoft.PowerShell.EditorServices*.dll
53+
PowerShellEditorServices/**/Microsoft.PowerShell.EditorServices*.dll
5454
# PowerShellEditorServices.VSCode Script
55-
release/out/**/PowerShellEditorServices.VSCode.psd1
55+
PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.psd1
5656
# PowerShellEditorServices.VSCode Binary
57-
release/out/**/Microsoft.PowerShell.EditorServices.VSCode.dll
58-
59-
- task: PowerShell@1
60-
displayName: 'Copy signed items into output'
61-
inputs:
62-
scriptType: inlineScript
63-
inlineScript: |
64-
$signed="$(Build.ArtifactStagingDirectory)\Signed\PowerShellEditorServices\*"
65-
$notSigned="$(Build.ArtifactStagingDirectory)\release\out\PowerShellEditorServices"
66-
Copy-Item $signed $notSigned -Recurse -Force
67-
68-
- task: PowerShell@1
69-
displayName: 'Create catalog files'
70-
inputs:
71-
scriptType: inlineScript
72-
inlineScript: |
73-
$dir = "$(Build.ArtifactStagingDirectory)\release\out\PowerShellEditorServices\PowerShellEditorServices"
74-
New-FileCatalog -CatalogFilePath "$(Build.ArtifactStagingDirectory)\PowerShellEditorServices.cat" -Path $dir
75-
76-
$dir = "$(Build.ArtifactStagingDirectory)\release\out\PowerShellEditorServices\PowerShellEditorServices.VSCode"
77-
New-FileCatalog -CatalogFilePath "$(Build.ArtifactStagingDirectory)\PowerShellEditorServices.VSCode.cat" -Path $dir
78-
79-
- task: PkgESCodeSign@10
80-
displayName: 'CodeSign tools/releaseBuild/FileCatalogSigning.xml'
81-
env:
82-
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
83-
inputs:
84-
signConfigXml: tools/releaseBuild/FileCatalogSigning.xml
85-
inPathRoot: '$(Build.ArtifactStagingDirectory)'
86-
outPathRoot: '$(Build.ArtifactStagingDirectory)'
57+
PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll
8758
59+
# TODO: Use templates for compliance checks
8860
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
8961
displayName: 'Component Detection'
9062

@@ -149,8 +121,9 @@ steps:
149121
uploadTSLint: false
150122
uploadAsync: true
151123

124+
# TODO: Use `publish` task instead of script
152125
- task: PowerShell@1
153126
displayName: 'Upload artifacts'
154127
inputs:
155128
scriptType: inlineScript
156-
inlineScript: 'Write-Host "##vso[artifact.upload containerfolder=PowerShellEditorServices;artifactname=PowerShellEditorServices]$(Build.ArtifactStagingDirectory)\release\out\PowerShellEditorServices"'
129+
inlineScript: 'Write-Host "##vso[artifact.upload containerfolder=PowerShellEditorServices;artifactname=PowerShellEditorServices]$(Build.ArtifactStagingDirectory)/Signed/PowerShellEditorServices"'

0 commit comments

Comments
 (0)