Skip to content

Plugin env

Hannes Georg edited this page Dec 23, 2016 · 1 revision

since 0.3.1

The env plugin is used to add environment variables to a build.

A small example:

plugin 'env', 'PATH' => '$PATH:/foo/bin'

before_build do
  bash "echo $PATH" # PATH contains /foo/bin
end

bash "echo $PATH" # PATH contains /foo/bin

Symbols also work:

plugin 'env', PATH: '$PATH:/foo/bin'

Variables are added even before dependencies are installed and even before the before_dependencies steps are executed. Furthermore, they apply to all steps even in before_dependencies and before_build. This behavior is not reproducible with simple base "export ..." steps.

Clone this wiki locally