Skip to content

Named pattern in Gupfile #2

@np

Description

@np

Concretly I would like to name parts of the patterns in the Gupfile these variables should then be accessible through build script, using environment variables for instance.

Here is a mockup example:

build-html:
  %(base:*).html
build-archive:
  %(dir:*)/%(base:*).%(ext:tar.gz)
  %(dir:*)/%(base:*).%(ext:tar.xz)

If one builds foo/bar.html, in build-html one has access to GUP_base=foo/bar.
If one builds foo/bar.tar.gz, in build-archive one has access to GUP_dir=foo,
GUP_base=bar, and GUP_ext=tar.gz.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions