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

Refactor build script for improved readability and maintainability #1163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danielmerja
Copy link

  • Consolidated common logic for loading suite, flavor, and board into a single load_config function.

  • Reduced repetitive cd commands and improved error handling.

  • Streamlined partial-build checks (kernel-only, rootfs-only, etc.) for early exits.

  • Ensured original functionality remains intact while enhancing code clarity.

Consolidated common logic for loading suite, flavor, and board into a single load_config function.
Reduced repetitive cd commands and improved error handling.
Streamlined partial-build checks (kernel-only, rootfs-only, etc.) for early exits.
Ensured original functionality remains intact while enhancing code clarity.
@Joshua-Riek
Copy link
Owner

Thanks a lot for this. I will review this pr in a few days; I'm going through some stuff in my life and need some time to sort things out.

@danielmerja
Copy link
Author

Thanks a lot for this. I will review this pr in a few days; I'm going through some stuff in my life and need some time to sort things out.

Thank you for your contribution. This one of my favorite projects. Please take your time 🙏

# Redirect all script output to a log file.
#######################################
mkdir -p build/logs
exec > >(tee "build/logs/build-$(date +"%Y%m%d%H%M%S").log") 2>&1
Copy link
Owner

Choose a reason for hiding this comment

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

When using an Ubuntu 24.04 host machine this line will cause the script to exit early for some reason if one of the required parameters are not populated for a full build.

Below is an example, the script will exit as the log file is created, I have no idea why this happens.

$ sudo ./build.sh --suite=jammy --flavor=server

Copy link
Author

Choose a reason for hiding this comment

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

Interesting! I will take a look at it this weekend and see if I can resolve it. Thank you

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