1
0
mirror of https://github.com/bitwarden/mobile synced 2024-12-25 00:12:24 +01:00

increment version for ios

This commit is contained in:
Kyle Spearrin 2020-06-09 21:23:10 -04:00
parent df15fa2f0e
commit 363f5be8ff
3 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,26 @@
$rootPath = $env:GITHUB_WORKSPACE;
$buildNumber = 100 + [int]$env:GITHUB_RUN_NUMBER;
$bitwardenInfo = $($rootPath + "/src/iOS/Info.plist");
$extensionInfo = $($rootPath + "/src/iOS.Extension/Info.plist");
$autofillInfo = $($rootPath + "/src/iOS.Autofill/Info.plist");
Write-Output "########################################"
Write-Output "##### Setting CFBundleVersion $buildNumber"
Write-Output "########################################"
function Update-Version($file) {
$xml=New-Object XML;
$xml.Load($file);
Select-Xml -xml $xml -XPath "//dict/key[. = 'CFBundleVersion']/following-sibling::string[1]" |
%{
$_.Node.InnerXml = $buildNumber
}
$xml.Save($file);
}
Update-Version $bitwardenInfo
Update-Version $extensionInfo
Update-Version $autofillInfo

View File

@ -11,4 +11,3 @@ security set-keychain-settings -lut 1200 build.keychain
security import $mobileKeyPath -k build.keychain -P $env:MOBILE_KEY_PASSWORD -T /usr/bin/codesign -T /usr/bin/security
security import $distCertPath -k build.keychain -P $env:DIST_CERT_PASSWORD -T /usr/bin/codesign -T /usr/bin/security
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $env:KEYCHAIN_PASSWORD build.keychain
security find-identity -v -p codesigning

View File

@ -138,6 +138,11 @@ jobs:
env:
DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
- name: Increment version
if: github.ref == 'refs/heads/master'
run: ./.github/scripts/ios/increment-version.ps1
shell: pwsh
- name: Set up keychain
if: github.ref == 'refs/heads/master'
run: ./.github/scripts/ios/setup-keychain.ps1