diff --git a/src/copier/devcontainer-feature.json b/src/copier/devcontainer-feature.json index 6e95b5967..dcf4c7d30 100644 --- a/src/copier/devcontainer-feature.json +++ b/src/copier/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "copier", - "version": "7.0.13", + "version": "7.0.14", "name": "copier (via pipx)", "documentationURL": "http://github.com/devcontainers-extra/features/tree/main/src/copier", "description": "copier creates projects from project templates.", @@ -12,6 +12,11 @@ "latest" ], "type": "string" + }, + "injections": { + "default": "", + "description": "Space delimitered list of python packages to inject into the main package env.", + "type": "string" } }, "installsAfter": [ diff --git a/src/copier/install.sh b/src/copier/install.sh index 9b60c220d..c8484ceb7 100755 --- a/src/copier/install.sh +++ b/src/copier/install.sh @@ -10,14 +10,13 @@ set -e # of the script ensure_nanolayer nanolayer_location "v0.5.0" - $nanolayer_location \ install \ devcontainer-feature \ "ghcr.io/devcontainers-extra/features/pipx-package:1.1.8" \ - --option package='copier' --option version="$VERSION" - - + --option package='copier' \ + --option version="$VERSION" \ + --option injections="$INJECTIONS" echo 'Done!' diff --git a/test/copier/injections.sh b/test/copier/injections.sh new file mode 100755 index 000000000..76091881c --- /dev/null +++ b/test/copier/injections.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -e + +source dev-container-features-test-lib + +check "copier --version" copier --version +check "copier has jinja2-strcase extension available" bash -c 'find $(dirname $(dirname $(which copier))) -name "jinja2_strcase" | grep jinja2_strcase' + +reportResults diff --git a/test/copier/scenarios.json b/test/copier/scenarios.json index 9aab8a882..3c05afd14 100644 --- a/test/copier/scenarios.json +++ b/test/copier/scenarios.json @@ -4,5 +4,13 @@ "features": { "copier": {} } + }, + "injections": { + "image": "mcr.microsoft.com/devcontainers/base:debian", + "features": { + "copier": { + "injections": "jinja2-strcase" + } + } } } \ No newline at end of file