From 24a09b44c4ea93a0310458fe89aef42d42e0e451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20L=C3=A9on?= Date: Mon, 1 May 2023 21:16:35 +0200 Subject: [PATCH] feat: add logs and parameters to match --- .../ios_crendentials.json | 18 ------------------ plugins/fastlane-plugin-ios_cd/ios_keys.zip | Bin 877 -> 0 bytes .../fastlane-plugin-ios_cd/ios_keys.zip.gpg | Bin 957 -> 0 bytes .../ios_cd/actions/build_and_deploy_action.rb | 17 ++++++++++++++++- 4 files changed, 16 insertions(+), 19 deletions(-) delete mode 100644 plugins/fastlane-plugin-ios_cd/ios_crendentials.json delete mode 100644 plugins/fastlane-plugin-ios_cd/ios_keys.zip delete 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 deleted file mode 100644 index 909147c..0000000 --- a/plugins/fastlane-plugin-ios_cd/ios_crendentials.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "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-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgxLuVvuI7DafrGHTz\nATTtdB1TgIFkb12qFVyNSj4kuE+gCgYIKoZIzj0DAQehRANCAAQl7PyxfJR2QoKC\nmpqvjG4mQxMIzehm9TsLAjwLrPya4LWRyxrEEvPG/N5L06udHtv26gLDMR5gY6uO\nY1pVJX28\n-----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 deleted file mode 100644 index be63ca3f2f6534f340cc8796ba91403e6466adfa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 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 diff --git a/plugins/fastlane-plugin-ios_cd/ios_keys.zip.gpg b/plugins/fastlane-plugin-ios_cd/ios_keys.zip.gpg deleted file mode 100644 index 19cdb2c67db8c99ed9fd3b3a162bd97876738c00..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 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> 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 85ab9a6..4a3d2cd 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 @@ -15,12 +15,15 @@ module Fastlane # Decrypt the keys archive and Extract the keys archive Helper::IosCdHelper.decrypt_ios_keys('.') + UI.message("👉🏼 Credentials decrypted.") # Retrieve credentials creds = Helper::IosCdHelper.parseIosCredentials('.') + UI.message("👉🏼 Credentials parsed.") # Ensure temporary keychain exists Helper::IosCdHelper.ensure_temp_keychain(creds['temp_keychain_user'], creds['temp_keychain_password']) + UI.message("👉🏼 New keychain created") # Obtain App Store Connect API key api_key = Actions::AppStoreConnectApiKeyAction.run( @@ -30,6 +33,7 @@ module Fastlane duration: 1200, in_house: false ) + UI.message("👉🏼 API Key formated") last_testflight_build_number = Actions::LatestTestflightBuildNumberAction.run( @@ -46,6 +50,7 @@ module Fastlane build_number: last_testflight_build_number + 1, xcodeproj: "Runner.xcodeproj" ) + UI.message("👉🏼 Build number incremented") # Install Cocoapods Actions::CocoapodsAction.run( @@ -54,6 +59,7 @@ module Fastlane integrate: true, podfile: "./Podfile" ) + UI.message("👉🏼 Pod got") # Set up code signing using match # Configures and runs `match` which manages code signing certificates and provisioning profiles for the project. @@ -61,13 +67,20 @@ module Fastlane # 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( + api_key: api_key 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 + git_url: creds['git_url'], + username: "leonmalo@sfr.fr", + team_id: "118579280", + team_name: "Jagger & Lewis", + team_name: "https://github.com/JaggerLewis/jl2022_cert.git", + storage_mode: "git", ) + UI.message("👉🏼 App signed") # Build and export app using Gym # Builds and packages an iOS app or framework for distribution to the App Store, TestFlight, or Enterprise distribution. @@ -80,6 +93,7 @@ module Fastlane provisioningProfiles: creds['provisioning_profiles'] } ) + UI.message("👉🏼 App built") # Upload build to App Store Connect using Pilot Actions::PilotAction.run( @@ -91,6 +105,7 @@ module Fastlane notify_external_testers: false, ipa: "./Runner.ipa" ) + UI.message("👉🏼 App uploaded") Actions::DeleteTempKeychainAction.run end