Skip to content

Conversation

@itaybre
Copy link
Collaborator

@itaybre itaybre commented Nov 19, 2024

No description provided.

desc 'Configure order files for iOS'

# Optional options
option :only_enable_linkmaps, type: :boolean, required: false, desc: 'Only enable linkmaps'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option is a bit confusing, not sure what it's doing.

Copy link
Collaborator

@trevor-e trevor-e Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see below it's related to the download script, maybe that could instead be skip_download_script?

Logger.info " Creating script 'Download Order Files'"
phase = target.new_shell_script_build_phase('Download Order Files')
phase.shell_script = "\
if [ \"$CONFIGURATION\" != \"Release\" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would using a heredoc avoid all the escaping, or is that necessary for the script itself?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never tried heredoc, time to test it

# Create the script phase if it doesn't exist
phase = target.shell_script_build_phases.find { |item| item.name == 'Download Order Files' }
if phase.nil?
Logger.info " Creating script 'Download Order Files'"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would prefix with our name, e.g. EmergeTools Download Order Files


register 'configure' do |prefix|
prefix.register 'snapshots-ios', Commands::Config::SnapshotsIOS, aliases: ['c']
prefix.register 'order-files-ios', Commands::Config::OrderFilesIOS, aliases: ['o']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'm thinking maybe we want to avoid aliases for the subcommands and instead have one for configure? Also the c above for 'snapshots-ios' is probably a mistake.

@itaybre itaybre merged commit 4327379 into main Nov 20, 2024
@itaybre itaybre deleted the feature/order_files branch November 20, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants