From 1759498e238a9db3ed70ae32fba8aef3620617b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20L=C3=A9on?= Date: Thu, 27 Apr 2023 14:49:24 +0200 Subject: [PATCH] refactor: update params typo (#2) --- .../ios_crendentials.json | 18 ++++++++++++++++ plugins/fastlane-plugin-ios_cd/ios_keys.zip | Bin 0 -> 877 bytes .../fastlane-plugin-ios_cd/ios_keys.zip.gpg | Bin 0 -> 957 bytes .../ios_cd/actions/build_and_deploy_action.rb | 20 +++++++++--------- .../plugin/ios_cd/helper/ios_cd_helper.rb | 8 +++---- 5 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 plugins/fastlane-plugin-ios_cd/ios_crendentials.json create mode 100644 plugins/fastlane-plugin-ios_cd/ios_keys.zip create mode 100644 plugins/fastlane-plugin-ios_cd/ios_keys.zip.gpg diff --git a/plugins/fastlane-plugin-ios_cd/ios_crendentials.json b/plugins/fastlane-plugin-ios_cd/ios_crendentials.json new file mode 100644 index 0000000..44c3dbe --- /dev/null +++ b/plugins/fastlane-plugin-ios_cd/ios_crendentials.json @@ -0,0 +1,18 @@ +{ + "developer_app_id":"1624036332", + "developer_app_identifier":"com.jaggerlewis.jl3", + "app_identifier_extensions":[ + "com.jaggerlewis.jl3", + "com.jaggerlewis.jl3.OneSignalNotificationServiceExtension" + + ], + "apple_issuer_id":"69a6de90-9fe1-47e3-e053-5b8c7c11a4d1", + "apple_key_id":"VBRDBQM7SJ", + "apple_key_content":"-----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgxLuVvuI7DafrGHTzATTtdB1TgIFkb12qFVyNSj4kuE+gCgYIKoZIzj0DAQehRANCAAQl7PyxfJR2QoKCmpqvjG4mQxMIzehm9TsLAjwLrPya4LWRyxrEEvPG/N5L06udHtv26gLDMR5gY6uOY1pVJX28-----END PRIVATE KEY-----", + "provisioning_profiles":{ + "1624036332": "match AppStore com.jaggerlewis.jl3", + "com.jaggerlewis.jl3.OneSignalNotificationServiceExtension": "match AppStore com.jaggerlewis.jl3.OneSignalNotificationServiceExtension" + }, + "temp_keychain_user":"root", + "temp_keychain_password":"toto1234" +} \ No newline at end of file diff --git a/plugins/fastlane-plugin-ios_cd/ios_keys.zip b/plugins/fastlane-plugin-ios_cd/ios_keys.zip new file mode 100644 index 0000000000000000000000000000000000000000..be63ca3f2f6534f340cc8796ba91403e6466adfa GIT binary patch literal 877 zcmWIWW@Zs#0D*<2v%|m)D8b2~z>t|=9G{(9S*#x#!pp$!pXZeV!XZFhTEWf0$nuqu zfdQ;N0Bj5g0|$yRbC?+z>R&oSz3b8)PoXd^EGS2FDi9 zauBKg9&WH_+p4tHtEchrQb8{&)I&z zvo~FyJw&>MLG*}4^PR7o&bTt#E|zS3>OSW{q0Zm0wE|06-U>d^y>a}c?~_)=Cx%y6 z?C4B-H|wj^>q9dgq7>$ceR&h!{~}OcxTd7Gcz#pwp)1|IcM5;YWk%+n(0^~U^o`Rb(W?v0rtK1yof&m{_rH*EQFory!09EfS$KVL3e zf9Co5*HLj^r;}x`tWuekR&niAZs@AXt=rE}U0N(C+s-2NxaHN|kBy1`<+qP*Q2rNj zD*jOAj^OJ*mREJUabIj{R+TCaGdwMG#lW}$_6rz2?!4Z=_yPg9smbe BL}vg1 literal 0 HcmV?d00001 diff --git a/plugins/fastlane-plugin-ios_cd/ios_keys.zip.gpg b/plugins/fastlane-plugin-ios_cd/ios_keys.zip.gpg new file mode 100644 index 0000000000000000000000000000000000000000..19cdb2c67db8c99ed9fd3b3a162bd97876738c00 GIT binary patch literal 957 zcmV;u148_a4Fm}T0-2V%D#&3@aPrc^>j4IobT;RMlY`19kOy9JV=!Am9UotjZujVP z)*4MU+8yoRv4?=YR|%{t22o^ruDpVPW`tc0rKC`UdCl`RWwod}LuD-+mbxn4SM_iKgTvOm7JBp)NOQ`N zSJIhO%N=Jlq9u5EEki6Z8Qt4wX&85D(4zQ&X+PrAqD^o{H6@PR`#gJ8I9#GJ!G`aU zsc2xbz$xYJLG;o*k8tmrvx*d|M>)Kkp~<*-R_rf7m$Uo)=b4|X8Iny&WE=`94c^NY z6g35ILt72tu}y8I^rtig-i7uRy+veIm^@W$g7<&mGYi_J*RQlv=rmPy&w(^8?4Jq% zeh@m~9?!1s8-?gv23ov5*3@aq9tCE%Xr>2wOXa>BHuO>NWdE)%Z zz?)HX7RCkT?cbmB8ofF*C`ZSIsK}dez^AaE&88Txx^KWzB|WnBtxK;fzi@@Fe%9pZ z$5;^L(Rf=@J1m&>#Ag(9F#LG4r>GBCc9VTK%9^7BI~o9kuf$4VL3RlSKP@y9nVXp# z#J^U_MW1=^?x<3o{|wjHaU1yu??3j~11>^Q36QD|aOq;g9rM5&uy)OQSP-Is>Mzyx z5i2pO-a_Mxd~b2i#x`RHW($s7gDCX>gLntvQRy`7%M(5nythB+BmNRXStx{Dhp>e1 z(5Z_VV@?ol-QbjU(}Y#$q*)MS${sN$?`R^Qp^t=kd=({2`EB2lNak46Z@{qT{s!#s z{Cbu;y&hVT{}xI{V=tM%Qy44aFW9OozMvcPwgXkCUJK_OJRu}EUdGhYLM1yY=WjhYVC78{U}Ouv>P}`KB^GC+B=>BEjx}=n;;a(^DE~ zzDn8A{%@8^dlQ4L>wPYEN}P)cPNSX3cWY?g){hT!%2t#;X2sF_>vS%O=LzpQ)Z-yN zB0AM!gc@K2vi2uULusKTUGjVy$Di>$KgE&s&GW3s3}~OHkb> literal 0 HcmV?d00001 diff --git a/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/actions/build_and_deploy_action.rb b/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/actions/build_and_deploy_action.rb index 8691592..588919e 100644 --- a/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/actions/build_and_deploy_action.rb +++ b/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/actions/build_and_deploy_action.rb @@ -25,13 +25,13 @@ module Fastlane Helper::IosCdHelper.ensure_temp_keychain(creds['temp_keychain_user'], creds['temp_keychain_password']) # Obtain App Store Connect API key - api_key = Actions::AppStoreConnectApiKeyAction.run( + api_key = Actions::AppStoreConnectApiKeyAction.run({ key_id: creds['apple_key_id'], issuer_id: creds['apple_issuer_id'], key_content: creds['apple_key_content'], duration: 1200, in_house: false - ) + }) # Increment build number for latest TestFlight build Actions::IncrementBuildNumberAction.run({ @@ -40,27 +40,27 @@ module Fastlane }) # Install Cocoapods - Actions::CocoapodsAction.run( + Actions::CocoapodsAction.run({ clean_install: true - ) + }) # Set up code signing using match # Configures and runs `match` which manages code signing certificates and provisioning profiles for the project. # The function takes the app's bundle identifier, an authorization token for the project's Git repository, and the name and password for a temporary keychain used to store the signing certificate. # It uses the App Store Connect API key to access the App Store and increment the build number. # It then runs `gym` to build and sign the app using the selected provisioning profile, and finally, uses `pilot` to upload the app to TestFlight for beta testing. - Actions::MatchAction.run( + Actions::MatchAction.run({ type: 'appstore', app_identifier: creds['app_identifier_extensions'], git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]), keychain_name: creds['temp_keychain_user'], keychain_password: creds['temp_keychain_password'], api_key: api_key - ) + }) # Build and export app using Gym # Builds and packages an iOS app or framework for distribution to the App Store, TestFlight, or Enterprise distribution. - Actions::GymAction.run( + Actions::GymAction.run({ configuration: "Release", workspace: "Runner.xcworkspace", scheme: "your_schema", @@ -68,10 +68,10 @@ module Fastlane export_options: { provisioningProfiles: creds['provisioning_profiles'] } - ) + }) # Upload build to App Store Connect using Pilot - Actions::PilotAction.run( + Actions::PilotAction.run({ apple_id: creds['developer_app_id'].to_s, app_identifier: creds['developer_app_identifier'].to_s, skip_waiting_for_build_processing: true, @@ -79,7 +79,7 @@ module Fastlane distribute_external: false, notify_external_testers: false, ipa: "./Runner.ipa" - ) + }) Actions::DeleteTempKeychainAction.run end diff --git a/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/helper/ios_cd_helper.rb b/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/helper/ios_cd_helper.rb index 308892f..aa7860e 100644 --- a/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/helper/ios_cd_helper.rb +++ b/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/helper/ios_cd_helper.rb @@ -8,20 +8,20 @@ module Fastlane # Define method to delete temporary keychain def self.delete_temp_keychain(name) if File.exist?(File.expand_path("~/Library/Keychains/#{name}-db")) - Actions::DeleteKeychainAction.run( + Actions::DeleteKeychainAction.run({ name: name - ) + }) end end # Define method to create temporary keychain def self.create_temp_keychain(name, password) - Actions::CreateKeychainAction.run( + Actions::CreateKeychainAction.run({ name: name, password: password, unlock: false, timeout: 0 - ) + }) end # Define method to ensure that temporary keychain exists