Update azure-pipelines.yml for Azure Pipelines

This commit is contained in:
Brett Hewitson 2022-12-22 21:43:08 +10:00
parent dcad782ef4
commit 95cda8f997

View file

@ -176,7 +176,6 @@ stages:
#define AppVerPath "$appVersionWithUnderscores"
#define RootPath "$env:BUILD_ARTIFACTSTAGINGDIRECTORY"
"@
#$installTextFileContent | Out-File -LiteralPath:$installTextFile -Force -Encoding ascii
$installTextFileContent | Set-Content "$installTextFile" -Encoding Ascii -Force
& "$env:AGENTCAPABILITIES_USER_INNOSETUP" "$installScriptFile"
@ -191,16 +190,7 @@ stages:
targetType: 'inline'
script: |
$appVersion = $env:BUILD_BUILDNUMBER
$appVersionShort = $appVersion.Substring(0, $appVersion.LastIndexOf('.'))
$appVersionWithUnderscores = $appVersion.Replace('.', '_')
#$fileExtension = '.application'
#$applicationFiles = Get-ChildItem -Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY -Filter "*$fileExtension" -File -Name
#$applicationFile = $applicationFiles.Where({$_.Replace(' ', '') -eq "$(ApplicationName)$fileExtension"})
#if ($applicationFile.Count -ne 1) {
# throw "Could not find the application file ($(ApplicationName)$fileExtension)"
#}
#$applicationFileName = [System.IO.Path]::GetFileNameWithoutExtension($applicationFile[0])
$applicationFolderName = "$(ApplicationName)_$($appVersionWithUnderscores)"
$sourcePath = "$env:BUILD_ARTIFACTSTAGINGDIRECTORY/Application Files/$applicationFolderName"
@ -218,14 +208,6 @@ stages:
$appVersion = $env:BUILD_BUILDNUMBER
$appVersionShort = $appVersion.Substring(0, $appVersion.LastIndexOf('.'))
$appVersionWithUnderscores = $appVersion.Replace('.', '_')
#$fileExtension = '.application'
#$applicationFiles = Get-ChildItem -Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY -Filter "*$fileExtension" -File -Name
#$applicationFile = $applicationFiles.Where({$_.Replace(' ', '') -eq "$(ApplicationName)$fileExtension"})
#if ($applicationFile.Count -ne 1) {
# throw "Could not find the application file ($(ApplicationName)$fileExtension)"
#}
#$applicationFileName = [System.IO.Path]::GetFileNameWithoutExtension($applicationFile[0])
$applicationFolderName = "$(ApplicationName)_$($appVersionWithUnderscores)"
$sourcePath = "$env:BUILD_ARTIFACTSTAGINGDIRECTORY/Application Files/$applicationFolderName"
@ -241,7 +223,7 @@ stages:
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
enabled: false
enabled: true
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: '$(PublishFolder)'