forked from platformio/platformio-core
Pre/Post extra scripting for advanced control of PIO Build System // Resolve #891
This commit is contained in:
1 parent
7a56ec614c
commit
35a91dbd57
7 files changed
+69
-44
No files matched your search
@@ -297,6 +297,20 @@ def ProcessTest(env):
|
||||
duplicate=False)
|
||||
|
||||
|
||||
def GetPreExtraScripts(env):
|
||||
return [
|
||||
item[4:] for item in env.get("EXTRA_SCRIPTS", [])
|
||||
if item.startswith("pre:")
|
||||
]
|
||||
|
||||
|
||||
def GetPostExtraScripts(env):
|
||||
return [
|
||||
item[5:] if item.startswith("post:") else item
|
||||
for item in env.get("EXTRA_SCRIPTS", []) if not item.startswith("pre:")
|
||||
]
|
||||
|
||||
|
||||
def exists(_):
|
||||
return True
|
||||
|
||||
@@ -309,4 +323,6 @@ def generate(env):
|
||||
env.AddMethod(PioClean)
|
||||
env.AddMethod(ProcessDebug)
|
||||
env.AddMethod(ProcessTest)
|
||||
env.AddMethod(GetPreExtraScripts)
|
||||
env.AddMethod(GetPostExtraScripts)
|
||||
return env
|
||||
Reference in new issue
Block a user