File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
eng/common/core-templates/steps Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,18 @@ steps:
9191 script : |
9292 Write-Host "Copying Linux Path"
9393 $MBSIGN_APPFOLDER = '$(MBSIGN_APPFOLDER)'
94- $MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER -replace '/build', ''
95- $MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER + '/1.1.1032' + '/build'
94+ $MBSIGN_APPFOLDER = ($MBSIGN_APPFOLDER -replace '/build', '')
95+
96+ $versionRegex = '\d+\.\d+\.\d+'
97+ $package = Get-ChildItem -Path $MBSIGN_APPFOLDER -Directory |
98+ Where-Object { $_.Name -match $versionRegex }
99+
100+ if ($package.Count -ne 1) {
101+ Write-Host "There should be exactly one matching subfolder, but found $($package.Count)."
102+ exit 1
103+ }
104+
105+ $MBSIGN_APPFOLDER = $package[0].FullName + '/build'
96106 $MBSIGN_APPFOLDER | Write-Host
97107 $SignConfigPath = $MBSIGN_APPFOLDER + '/signconfig.xml'
98108 Copy-Item -Path "$(MBSIGN_APPFOLDER)/signconfig.xml" -Destination $SignConfigPath -Force
You can’t perform that action at this time.
0 commit comments