diff --git a/HISTORY.rst b/HISTORY.rst index c63cd919..51a05c9c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -19,6 +19,7 @@ PlatformIO 4.0 - Added support for Unix shell-style wildcards for `monitor_port `__ option (`issue #2541 `_) - Added new `monitor_flags `__ option which allows passing extra flags and options to `platformio device monitor `__ command (`issue #2165 `_) - Override default development platform upload command with a custom `upload_command `__ (`issue #2599 `_) + - Added support for `PLATFORMIO_DEFAULT_ENVS `__ system environment variable (`issue #1967 `_) - Fixed an issue when ``-U`` in ``build_flags`` does not remove macro previously defined via ``-D`` flag (`issue #2508 `_) * **Library Management** diff --git a/docs b/docs index c030b967..84973be5 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit c030b967a5fa6d2e234f536d99ae2fe0b4d1a88d +Subproject commit 84973be53b7465e37ab4b20ce245ffa12a294098 diff --git a/examples b/examples index 89963fed..b5ae9ea1 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 89963fed9ebd0e7123d58dad5f7fc5020769ca63 +Subproject commit b5ae9ea1bb754d9e06b195d65f24853ef58f376d diff --git a/platformio/project/config.py b/platformio/project/config.py index a7001cf3..ee7e71d1 100644 --- a/platformio/project/config.py +++ b/platformio/project/config.py @@ -284,7 +284,7 @@ class ProjectConfig(object): return [s[4:] for s in self._parser.sections() if s.startswith("env:")] def default_envs(self): - return self.get("platformio", "env_default", []) + return self.get("platformio", "default_envs", []) def validate(self, envs=None, silent=False): if not isfile(self.path): diff --git a/platformio/project/options.py b/platformio/project/options.py index 1c5ff5e9..66fb13fc 100644 --- a/platformio/project/options.py +++ b/platformio/project/options.py @@ -48,9 +48,10 @@ ProjectOptions = OrderedDict([ # [platformio] # ConfigPlatformioOption(name="description"), - ConfigPlatformioOption(name="env_default", + ConfigPlatformioOption(name="default_envs", + oldnames=["env_default"], multiple=True, - sysenvvar="PLATFORMIO_ENV_DEFAULT"), + sysenvvar="PLATFORMIO_DEFAULT_ENVS"), ConfigPlatformioOption(name="extra_configs", multiple=True), # Dirs diff --git a/tests/test_projectconf.py b/tests/test_projectconf.py index 1448cdb2..38725f8a 100644 --- a/tests/test_projectconf.py +++ b/tests/test_projectconf.py @@ -74,8 +74,8 @@ def test_real_config(tmpdir): with tmpdir.as_cwd(): config = ProjectConfig(tmpdir.join("platformio.ini").strpath) assert config - assert len(config.warnings) == 1 - assert "lib_install" in config.warnings[0] + assert len(config.warnings) == 2 + assert "lib_install" in config.warnings[1] config.validate(["extra_2", "base"], silent=True) with pytest.raises(UnknownEnvNames):