1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-06 00:28:07 +02:00
bitwarden-mobile/.github/scripts/android/increment-version.ps1

17 lines
523 B
PowerShell
Raw Normal View History

2020-06-08 18:14:10 +02:00
$rootPath = $env:GITHUB_WORKSPACE;
$buildNumber = 3000 + [int]$env:GITHUB_RUN_NUMBER;
2020-06-08 22:10:17 +02:00
Write-Output "########################################"
Write-Output "##### Setting Version Code $buildNumber"
Write-Output "########################################"
$androidManifest = $($rootPath + "/src/Android/Properties/AndroidManifest.xml");
2020-06-08 18:14:10 +02:00
$xml=New-Object XML;
$xml.Load($androidManifest);
$node=$xml.SelectNodes("/manifest");
$node.SetAttribute("android:versionCode", [string]$buildNumber);
$xml.Save($androidManifest);