Get version from AssemblyInfo.cs and set environment variable

This commit is contained in:
Jaex 2016-09-22 02:33:30 +03:00
parent f6a9017bd3
commit bcc4851f57
2 changed files with 9 additions and 0 deletions

View file

@ -9,6 +9,8 @@ shallow_clone: true
environment:
APIKeys:
secure: oWmEefxkbok87VNVsrUuXKgNaM4+j+EW6FBLsXwCbv3OVHgFvT0M9k4891OvYXDsj0oLuEn0oZeaeV8RrRDHA2Hk2acXHrWkg9z6FCGASxRMJjv0+in1v5DxN1BfEPdASmhnYFu6pcINmwibGYjsxySek57cbYUDc69yQfyqX6FUI0kQcEGp8Dh3tHF981Dy
install:
- ps: AppVeyor\install.ps1
before_build:
- ps: AppVeyor\before_build.ps1
build:

7
AppVeyor/install.ps1 Normal file
View file

@ -0,0 +1,7 @@
$content = Get-Content "D:\Dev\GitHub\ShareX\ShareX\ShareX\Properties\AssemblyInfo.cs"
$match = [regex]::Match($content, 'AssemblyVersion\(\"(.+?)\"\)')
if ($match.Success)
{
$env:AppVersion = $match.Groups[1].Value
}
Write-Host "Test: ShareX $env:AppVersion"