Skip to content
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

Add command to configure project for order files #7

Merged
merged 6 commits into from
Nov 20, 2024

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

@@ -30,6 +31,7 @@ module EmergeCLI

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
3 checks passed
@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.

2 participants