forked from platformio/platformio-core
Inject system environment variables to configuration settings in platformio.ini // Resolve #792
This commit is contained in:
1 parent
e42387fbf4
commit
e4a91b8343
3 files changed
+13
-3
No files matched your search
@@ -48,10 +48,13 @@ Each variable should have a next format: ``${<section>.<option>}``, where
|
||||
``<section>`` is a value from ``[<section>]`` group, and ``<option>`` is a
|
||||
first item from pair ``<option> = value``.
|
||||
|
||||
You can inject environment variable using ``env`` as a ``section``. For example,
|
||||
``${env.HOME}``, etc.
|
||||
|
||||
* Variable can be applied only for the option's value
|
||||
* Multiple variables are allowed
|
||||
* The ``platformio`` section is reserved and could not be used as custom
|
||||
section. Some good section names might be ``common`` or ``global``.
|
||||
* The ``platformio`` and ``env`` sections are reserved and could not be used
|
||||
as custom section. Some good section names might be ``common`` or ``global``.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -68,6 +71,7 @@ Example:
|
||||
board = uno
|
||||
build_flags = ${common.build_flags}
|
||||
lib_deps = ${common.lib_deps_builtin}, ${common.lib_deps_external}
|
||||
lib_extra_dirs = ${env.HOME}/arduino/libs
|
||||
|
||||
[env:nodemcuv2]
|
||||
platform = espressif8266
|
||||
|
||||
Reference in new issue
Block a user