@@ -628,11 +628,11 @@ platform :ios do
628628 end
629629
630630 # Calculate SHA-256 for the local IPA file
631- sh "echo SHA of IPA is:"
632- sh "shasum -a 256 ../#{ build . artifact_path ( with_filename : true ) } .ipa || true"
633- # ipa_path = "../#{build.artifact_path(with_filename: true)}.ipa"
634- # sha256 = `shasum -a 256 #{ipa_path} | awk '{print $1}'`.strip
635- # UI.message("SHA-256 of IPA is: #{sha256}")
631+ # sh "echo SHA of IPA is:"
632+ # sh "shasum -a 256 ../#{build.artifact_path(with_filename: true)}.ipa || true"
633+ ipa_path = "../#{ build . artifact_path ( with_filename : true ) } .ipa"
634+ sha256 = `shasum -a 256 #{ ipa_path } | awk '{print $1}'` . strip
635+ UI . message ( "SHA-256 of IPA is: #{ sha256 } " )
636636
637637 appcenter_upload (
638638 api_token : ENV [ "APPCENTER_API_TOKEN" ] ,
@@ -647,15 +647,15 @@ platform :ios do
647647
648648 # Fetch install URL after upload
649649 appcenter_build_info = Fastlane ::Actions . lane_context [ :APPCENTER_BUILD_INFORMATION ]
650- `export TEMP='BUILD_INSTALL_LINK=#{ appcenter_build_info [ 'install_url' ] } ' && echo $TEMP >> ./.post_build/.env`
651- # install_url = appcenter_build_info['install_url']
650+ # `export TEMP='BUILD_INSTALL_LINK=#{appcenter_build_info['install_url']}' && echo $TEMP >> ./.post_build/.env`
651+ install_url = appcenter_build_info [ 'install_url' ]
652652
653- # # Export SHA-256 and INSTALL_LINK to .post_build/.env file
654- # export_env_path = "./.post_build/.env"
655- # FileUtils.mkdir_p("./.post_build")
653+ # Export SHA-256 and INSTALL_LINK to .post_build/.env file
654+ export_env_path = "./.post_build/.env"
655+ FileUtils . mkdir_p ( "./.post_build" )
656656
657- # sh "export TEMP='BUILD_INSTALL_LINK=#{install_url}' && echo $TEMP >> #{export_env_path}"
658- # sh "export TEMP='BUILD_SHA256=#{sha256}' && echo $TEMP >> #{export_env_path}"
657+ sh "export TEMP='BUILD_INSTALL_LINK=#{ install_url } ' && echo $TEMP >> #{ export_env_path } "
658+ sh "export TEMP='BUILD_SHA256=#{ sha256 } ' && echo $TEMP >> #{ export_env_path } "
659659 end
660660
661661 # Upload to S3 (Automation builds)
0 commit comments