diff --git a/examples/valid/post-process/recipe.yaml b/examples/valid/post-process/recipe.yaml new file mode 100644 index 0000000..8c40d9f --- /dev/null +++ b/examples/valid/post-process/recipe.yaml @@ -0,0 +1,23 @@ +# yaml-language-server: $schema=../../../schema.json + +# Example recipe demonstrating the build.post_process feature. +# post_process applies regex replacements on files in the package +# after the build step. Files must be valid UTF-8 text. +# Regex uses Rust `regex` crate semantics with `replace_all` behavior. + +package: + name: post-process-example + version: "1.0.0" + +build: + number: 0 + post_process: + - files: + - "bin/*" + regex: "/old/path" + replacement: "/new/path" + - files: + - "**/*.cmake" + - "**/*.pc" + regex: "/home/builder" + replacement: "$PREFIX" diff --git a/tests/test_recipe.py b/tests/test_recipe.py index bda3896..51c0c54 100644 --- a/tests/test_recipe.py +++ b/tests/test_recipe.py @@ -11,7 +11,7 @@ @pytest.fixture( scope="module", - params=["mamba", "xtensor", "single-output", "zlib", "staging"], + params=["mamba", "xtensor", "single-output", "zlib", "staging", "post-process"], ) def valid_recipe(request) -> str: recipe_name = request.param