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

Image customization: add include() function #3148

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Jan 5, 2024

  1. Makefile: remove duplicate . from error messages

    $(error ...) already adds a `.` to the end of error messages.
    neocturne committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    7d735b5 View commit details
    Browse the repository at this point in the history
  2. scripts: image_customization_lib: make error messages lowercase

    Error messages generated by Lua usually start with a lowercase letter.
    Let's make our own messages match.
    neocturne committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    19ea520 View commit details
    Browse the repository at this point in the history
  3. scripts: image_customization_lib: add include() function

    Add a simple way to include image customization Lua snippets.
    Can be used to split long files, to include the same options multiple
    times in different conditional branches, or even to pass values back to
    the including file using return.
    
    Relative paths are interpreted relative to the site root (where
    image-customization.lua is located). Relative includes would become
    confusing when subdirectories are involved (as they are still interpreted
    relative to the site root, and proper tracking of current directory for
    each include seems fairly complex for a very niche use case), so we simply
    reject this case for now; this way, we can implement this however we
    want in the future if deemed necessary, without a breaking change.
    neocturne committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    fa09986 View commit details
    Browse the repository at this point in the history