mirror of
https://github.com/bitwarden/android.git
synced 2025-01-11 18:57:39 +03:00
fdroid-build script
This commit is contained in:
parent
2f025d51ff
commit
9a13036f4e
4 changed files with 13 additions and 43 deletions
|
@ -9,13 +9,7 @@ after_build:
|
|||
- IF DEFINED keystore_dec_secret secure-file\tools\secure-file -decrypt src\Android\8bit.keystore.enc -secret %keystore_dec_secret%
|
||||
- IF DEFINED keystore_password msbuild "/t:SignAndroidPackage" "/p:Configuration=Release" "/p:AndroidKeyStore=true" "/p:AndroidSigningKeyAlias=bitwarden" "/p:AndroidSigningKeyPass=%keystore_password%" "/p:AndroidSigningKeyStore=8bit.keystore" "/p:AndroidSigningStorePass=%keystore_password%" "src\Android\Android.csproj"
|
||||
- ps: IF($env:keystore_dec_secret) { copy-item src\Android\bin\Release\com.x8bit.bitwarden-Signed.apk .\com.x8bit.bitwarden-$($env:APPVEYOR_BUILD_NUMBER).apk }
|
||||
- IF DEFINED keystore_password msbuild ".\src\Android\Android.csproj" "/t:Clean" "/p:Configuration=FDroid"
|
||||
- IF DEFINED keystore_password msbuild ".\src\App\App.csproj" "/t:Clean" "/p:Configuration=FDroid"
|
||||
- ps: IF($env:keystore_dec_secret) { .\src\Android\fdroid-remove-libs.ps1 $($env:APPVEYOR_BUILD_FOLDER) }
|
||||
- IF DEFINED keystore_password nuget restore
|
||||
- IF DEFINED keystore_password msbuild ".\src\Android\Android.csproj" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" "/p:Configuration=FDroid"
|
||||
- IF DEFINED keystore_password msbuild "/t:SignAndroidPackage" "/p:Configuration=FDroid" "/p:AndroidKeyStore=true" "/p:AndroidSigningKeyAlias=bitwarden" "/p:AndroidSigningKeyPass=%keystore_password%" "/p:AndroidSigningKeyStore=8bit.keystore" "/p:AndroidSigningStorePass=%keystore_password%" "src\Android\Android.csproj"
|
||||
- ps: IF($env:keystore_dec_secret) { copy-item src\Android\bin\FDroid\com.x8bit.bitwarden-Signed.apk .\com.x8bit.bitwarden-fdroid-$($env:APPVEYOR_BUILD_NUMBER).apk }
|
||||
- ps: IF($env:keystore_dec_secret) { .\src\Android\fdroid-build.ps1 }
|
||||
on_success:
|
||||
- IF DEFINED play_dec_secret secure-file\tools\secure-file -decrypt store\google\Publisher\play_creds.json.enc -secret %play_dec_secret%
|
||||
- IF DEFINED play_dec_secret dotnet store\google\Publisher\bin\Debug\netcoreapp2.0\Publisher.dll %APPVEYOR_BUILD_FOLDER%\store\google\Publisher\play_creds.json %APPVEYOR_BUILD_FOLDER%\com.x8bit.bitwarden-%APPVEYOR_BUILD_NUMBER%.apk alpha
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
<ItemGroup>
|
||||
<None Include="8bit.keystore.enc" />
|
||||
<GoogleServicesJson Include="google-services.json" />
|
||||
<None Include="fdroid-remove-libs.ps1" />
|
||||
<None Include="fdroid-build.ps1" />
|
||||
<None Include="google-services.json.enc" />
|
||||
<None Include="increment-version.ps1" />
|
||||
<None Include="Resources\AboutResources.txt" />
|
||||
|
|
11
src/Android/fdroid-build.ps1
Normal file
11
src/Android/fdroid-build.ps1
Normal file
|
@ -0,0 +1,11 @@
|
|||
msbuild "Android.csproj" "/t:Clean" "/p:Configuration=FDroid"
|
||||
msbuild "..\App\App.csproj" "/t:Clean" "/p:Configuration=FDroid"
|
||||
|
||||
Uninstall-Package Xamarin.Firebase.Messaging
|
||||
Uninstall-Package Xamarin.GooglePlayServices.Analytics
|
||||
Uninstall-Package HockeySDK.Xamarin
|
||||
|
||||
msbuild "Android.csproj" "/logger:C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" "/p:Configuration=FDroid"
|
||||
msbuild "Android.csproj" "/t:SignAndroidPackage" "/p:Configuration=FDroid" "/p:AndroidKeyStore=true" "/p:AndroidSigningKeyAlias=bitwarden" "/p:AndroidSigningKeyPass=$($env:keystore_password)" "/p:AndroidSigningKeyStore=8bit.keystore" "/p:AndroidSigningStorePass=$($env:keystore_password)"
|
||||
|
||||
Copy-Item .\bin\FDroid\com.x8bit.bitwarden-Signed.apk ..\com.x8bit.bitwarden-fdroid-$($env:APPVEYOR_BUILD_NUMBER).apk
|
|
@ -1,35 +0,0 @@
|
|||
$rootPath = $args[0];
|
||||
|
||||
$androidPath = $($rootPath + "\src\Android\Android.csproj");
|
||||
$appPath = $($rootPath + "\src\App\App.csproj");
|
||||
|
||||
# Backup files
|
||||
|
||||
Copy-Item $androidPath $($androidPath + ".original");
|
||||
Copy-Item $appPath $($appPath + ".original");
|
||||
|
||||
# Android.csproj
|
||||
|
||||
$xml=New-Object XML;
|
||||
$xml.Load($androidPath);
|
||||
|
||||
$ns=New-Object System.Xml.XmlNamespaceManager($xml.NameTable);
|
||||
$ns.AddNamespace("ns", $xml.DocumentElement.NamespaceURI);
|
||||
|
||||
$firebaseNode=$xml.SelectSingleNode("/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.Firebase.Messaging']", $ns);
|
||||
$firebaseNode.ParentNode.RemoveChild($firebaseNode);
|
||||
|
||||
$playServiceNode=$xml.SelectSingleNode("/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.GooglePlayServices.Analytics']", $ns);
|
||||
$playServiceNode.ParentNode.RemoveChild($playServiceNode);
|
||||
|
||||
$xml.Save($androidPath);
|
||||
|
||||
# App.csproj
|
||||
|
||||
$xml=New-Object XML;
|
||||
$xml.Load($appPath);
|
||||
|
||||
$hockeyNode=$xml.SelectSingleNode("/Project/ItemGroup/PackageReference[@Include='HockeySDK.Xamarin']");
|
||||
$hockeyNode.ParentNode.RemoveChild($hockeyNode);
|
||||
|
||||
$xml.Save($appPath);
|
Loading…
Reference in a new issue