Update azure-pipelines.yml for Azure Pipelines

This commit is contained in:
Brett Hewitson 2022-12-21 20:44:00 +10:00
parent 73ef0f01b6
commit 94a4da1f39

View file

@ -77,30 +77,34 @@ stages:
- task: PowerShell@2
displayName: Create Installer Script File
env:
BUILD_BUILDNUMBER: $(Build.BuildNumber)
BUILD_ARTIFACTSTAGINGDIRECTORY: $(Build.ArtifactStagingDirectory)
inputs:
targetType: 'inline'
targetType: 'inline'
script: |
$appVersion = $(Build.BuildNumber)
$appVersionShort = $AppVersion.Substring(0, $appVersion.LastIndexOf('.'))
$appVersionShort = $appVersion.Substring(0, $appVersion.LastIndexOf('.'))
$appVersionWithUnderscores = $appVersion.Replace('.', '_')
$publishPath = $(Build.ArtifactStagingDirectory)\bin
$installTextFile = '.azure/scripts/Installer.txt'
$installTextFileContent = @"
#define AppVer "$($appVersionShort)"
#define AppVerFull "$($appVersion)"
#define AppVerPath "$($appVersionWithUnderscores)"
#define RootPath "$($publishPath)"
#define AppVer "$appVersionShort"
#define AppVerFull "$appVersion"
#define AppVerPath "$appVersionWithUnderscores"
#define RootPath "$publishPath"
"@
$installTextFileContent | Out-File -LiteralPath:$installTextFile -Force -Encoding ascii
pwsh: true
- task: Installer@1
displayName: 'Install Inno Setup'
inputs:
version: '6.0.5'
- task: Build@1
displayName: 'Build Inno Setup File'
displayName: 'Build Setup File'
inputs:
file: .azure/scripts/ArkServerManager.iss