platformio/platformio-core

Pre/Post Actions on buildprog not called

Aberta

#5.119 aberto em 25 de mar. de 2025

 (2 comentários) (0 reação) (0 responsável)Python (791 forks)batch import
build systemhelp wanted

Métricas do repositório

Stars
 (7.329 estrelas)
Métricas de merge de PR
 (Mesclagem média 109d 16h) (5 fundiu PRs em 30d)

Description

Trying to use pre-/post-action hooks but can't figure out what I'm missing

platformio.ini:

[env]
board = cubecell_module_plus
framework = arduino
platform = heltec-cubecell
extra_scripts = pre:${PROJECT_DIR}/scripts/extra_script.py

extra_script.py:

Import("env")

print("This will be called")

def test(source, target, env):
    print("This will never be called")

def test2(source, target, env):
    print("This will never be called")

env.AddPreAction("buildprog", test)
env.AddPostAction("buildprog", test2)

output:

extra_scripts: pre:/Users/sebastien/Documents/PlatformIO/Projects/test/scripts/extra_script.py)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
This will be called
CONFIGURATION: https://docs.platformio.org/page/boards/heltec-cubecell/cubecell_module_plus.html
PLATFORM: Heltec CubeCell (1.1.0) > Heltec CubeCell-Module Plus (HTCC-AM02)

Guia do colaborador