grab version information from file to setup output zip name
This commit is contained in:
parent
890c419133
commit
3b4af20810
@ -10,3 +10,12 @@ foreach($localization in $localizations)
|
||||
$response = Invoke-WebRequest $url
|
||||
Out-File -FilePath $filePath -InputObject $response.Content -Encoding utf8
|
||||
}
|
||||
|
||||
$versionInfo = (Get-Command ("{0}\IW4MAdmin.exe" -f $PublishDir)).FileVersionInfo
|
||||
$json = @{
|
||||
Major = $versionInfo.ProductMajorPart
|
||||
Minor = $versionInfo.ProductMinorPart
|
||||
Build = $versionInfo.ProductBuildPart
|
||||
Revision = $versionInfo.ProductPrivatePart
|
||||
}
|
||||
$json | ConvertTo-Json > VersionInformation.json
|
@ -39,6 +39,12 @@ steps:
|
||||
platform: '$(buildPlatform)'
|
||||
configuration: '$(buildConfiguration)'
|
||||
|
||||
- task: oneLuckiDevJson2Variable@1
|
||||
inputs:
|
||||
jsonFile: '$(build.artifactStagingDirectory)\Application\VersionInformation.json'
|
||||
shouldPrefixVariables: true
|
||||
variablePrefix: 'VersionInformation'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
inputs:
|
||||
command: 'publish'
|
||||
@ -101,7 +107,7 @@ steps:
|
||||
rootFolderOrFile: '$(outputFolder)'
|
||||
includeRootFolder: false
|
||||
archiveType: 'zip'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/IW4MAdmin-v$(VersionInformation.Major).$(VersionInformation.Minor)-$(configuration)$(VersionInformation.Build)r$(VersionInformation.Revision)-$(Build.BuildId).zip'
|
||||
replaceExistingArchive: true
|
||||
|
||||
- task: FtpUpload@2
|
||||
|
Loading…
Reference in New Issue
Block a user