mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-03 06:54:16 +01:00
pio: auth as literal string
ref. https://scons.org/doc/production/HTML/scons-user.html#f-Literal > The specified string will be preserved as-is and not have construction variables expanded. resolve #1498
This commit is contained in:
@@ -116,15 +116,19 @@ def ensure_platform_updated():
|
||||
# using env instead of ini to avoid platformio ini changing hash on every change
|
||||
env.Append(
|
||||
ESPURNA_BOARD=os.environ.get("ESPURNA_BOARD", ""),
|
||||
ESPURNA_AUTH=os.environ.get("ESPURNA_AUTH", ""),
|
||||
ESPURNA_FLAGS=os.environ.get("ESPURNA_FLAGS", ""),
|
||||
)
|
||||
|
||||
ESPURNA_OTA_PORT = os.environ.get("ESPURNA_IP")
|
||||
if ESPURNA_OTA_PORT:
|
||||
env.Replace(UPLOAD_PROTOCOL="espota")
|
||||
env.Replace(UPLOAD_PORT=ESPURNA_OTA_PORT)
|
||||
env.Replace(UPLOAD_FLAGS="--auth=$ESPURNA_AUTH")
|
||||
env.Replace(
|
||||
ESPURNA_AUTH=env.Literal(os.environ.get("ESPURNA_AUTH", "")),
|
||||
)
|
||||
env.Replace(
|
||||
UPLOAD_PROTOCOL="espota",
|
||||
UPLOAD_PORT=ESPURNA_OTA_PORT,
|
||||
UPLOAD_FLAGS="--auth=$ESPURNA_AUTH",
|
||||
)
|
||||
else:
|
||||
env.Replace(UPLOAD_PROTOCOL="esptool")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user