-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pilot] ability to upload ipas to Testflight from Linux #22014
base: master
Are you sure you want to change the base?
[pilot] ability to upload ipas to Testflight from Linux #22014
Conversation
- add extra values to XMLTemplate.xml.erb and the IpaUploadPackageBuilder generator to support uploads from Linux - read straight from plist_data in IpaFileAnalyser - adapt tests - update readme
- make sur only 1 of auth args are used in the ShellScriptTransporterExecutor upload command - prevent ItunesTransporter asking for user input when jwt or api key is present - add extra test to expect the api key in the shell script command
Let me know what are your thoughts on these additional observations and if they should be addressed here, in a follow up PR, or not at all:
|
@@ -686,7 +722,7 @@ def initialize(user = nil, password = nil, use_shell_script = false, provider_sh | |||
use_shell_script ||= Helper.windows? | |||
use_shell_script ||= Feature.enabled?('FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT') | |||
|
|||
if jwt.to_s.empty? | |||
if jwt.to_s.empty? && api_key.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can anyone think of any reason to continue asking the user for input when the api key is set?
# as of Transporter v3.3.0, the app is unable to detect the private keys under the 'private_keys' folder in current directory | ||
# so we must rely on the other search paths in the Home dir: | ||
# https://help.apple.com/itc/transporteruserguide/en.lproj/static.html#itc803b7be80 | ||
private_keys_dir = File.join(Dir.home, ".appstoreconnect/private_keys") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to the docs, a private_keys
folder in the current directory SHOULD be supported (and would simplify the cleanup process a lot), but I couldn't make it work on my machine (bug in Transporter?), so I went ahead to use one of the other search paths suggested under $HOME
@AliSoftware maybe? 👀 |
Any progress on this? This would make our workflow much smoother 😄 |
@rogerluan maybe you can have a look? 🙏🏻 |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Make Testflight upload work from Linux using Transporter. This requires having Transporter installed on the machine.
Description
Add support for uploading an ipa to App Store Connect via api key when running
fastlane pilot
from a Linux machine. In order for this to happen, two major changes are needed:ShellScriptTransporterExecutor
(and surrounding code) to support API keys in theupload
methodmetadata.xml
file in the.itmsp
folder so that Transporter's asset validation process passes. This means the-f <.itmsp>
argument works without having to use-assetFile <ipa>
in combination with the-assetDescription <plist>
arguments (which improves users experience on linux).In this PR:
IpaFileAnalyser
(see CFPropertyList::List.initialize())Dir.mktmpdir
from existing testsBuildManager
,IpaUploadPackageBuilder
and theXMLTemplate.xml.erb
to add bundle identifier, short version and bundle version valuesTransporterExecutor.prepare
method and call that before everyexecute
command to create the file on disk in different places, depending on what kind of executor instance we deal withShellScriptTransporterExecutor.upload
and make sure only one of user/pass, jwt or api key is used at any momentItunesTransporter.initialize
when api key is not nilitunes_transporter_spec.rb
and adapt tests inbuild_manager_spec.rb
to use a real ipa and expect new calls and valuesTested on Linux (Debian 12) and MacOS (Sonoma 14).
Testing Steps