mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
increment version for ios
This commit is contained in:
parent
df15fa2f0e
commit
363f5be8ff
3 changed files with 31 additions and 1 deletions
26
.github/scripts/ios/increment-version.ps1
vendored
Normal file
26
.github/scripts/ios/increment-version.ps1
vendored
Normal 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
|
1
.github/scripts/ios/setup-keychain.ps1
vendored
1
.github/scripts/ios/setup-keychain.ps1
vendored
|
@ -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
|
||||
|
|
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue