From 5011e47709af6929a3fb3752cbee795d26f7e3e7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 31 May 2019 21:18:37 +0300 Subject: [PATCH] Added support for "shared_dir" --- HISTORY.rst | 4 ++++ docs | 2 +- platformio/project/helpers.py | 5 +++++ platformio/project/options.py | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 7004f29e..29fe6dac 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -41,6 +41,10 @@ PlatformIO 4.0 - Fixed an issue with hardcoded C standard version when generating project for CLion IDE (`issue #2527 `_) - Fixed an issue with Project Generator when include path search order is inconsistent to what passed to the compiler (`issue #2509 `_) +* **PIO Remote** + + - Added support for `shared_dir `__ where you can place an extra files (extra scripts, LD scripts, etc.) which should be transferred to a remote machine + * **Miscellaneous** - Deprecated ``--only-check`` PlatformIO Core CLI option for "update" sub-commands, please use ``--dry-run`` instead diff --git a/docs b/docs index 683b3459..c9023fb4 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 683b3459e2b558a36dd0e0d3c46a38926f85fa94 +Subproject commit c9023fb4dcaa44630c6aad854e47b2720ffd3022 diff --git a/platformio/project/helpers.py b/platformio/project/helpers.py index 6106b0a1..c138cd8e 100644 --- a/platformio/project/helpers.py +++ b/platformio/project/helpers.py @@ -157,6 +157,11 @@ def get_project_data_dir(): "data")) +def get_project_shared_dir(): + return get_project_optional_dir("shared_dir", + join(get_project_dir(), "shared")) + + def calculate_project_hash(): check_suffixes = (".c", ".cc", ".cpp", ".h", ".hpp", ".s", ".S") chunks = [__version__] diff --git a/platformio/project/options.py b/platformio/project/options.py index 448b9188..fbebff03 100644 --- a/platformio/project/options.py +++ b/platformio/project/options.py @@ -81,6 +81,8 @@ ProjectOptions = OrderedDict([ sysenvvar="PLATFORMIO_BOARDS_DIR"), ConfigPlatformioOption(name="data_dir", sysenvvar="PLATFORMIO_DATA_DIR"), + ConfigPlatformioOption(name="shared_dir", + sysenvvar="PLATFORMIO_SHARED_DIR"), # # [env]