mirror of
https://github.com/esphome/esphome.git
synced 2024-12-26 17:17:46 +01:00
libretiny: Allow specifying version of explicitly imported sources (#7408)
This commit is contained in:
parent
9722876ef6
commit
32995a352b
@ -1,10 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from os.path import (
|
from os.path import dirname, isfile, join
|
||||||
dirname,
|
|
||||||
isfile,
|
|
||||||
join,
|
|
||||||
)
|
|
||||||
|
|
||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
import esphome.config_validation as cv
|
||||||
@ -282,10 +278,10 @@ async def component_to_code(config):
|
|||||||
# if platform version is a valid version constraint, prefix the default package
|
# if platform version is a valid version constraint, prefix the default package
|
||||||
framework = config[CONF_FRAMEWORK]
|
framework = config[CONF_FRAMEWORK]
|
||||||
cv.platformio_version_constraint(framework[CONF_VERSION])
|
cv.platformio_version_constraint(framework[CONF_VERSION])
|
||||||
if str(framework[CONF_VERSION]) != "0.0.0":
|
if framework[CONF_SOURCE]:
|
||||||
cg.add_platformio_option("platform", f"libretiny @ {framework[CONF_VERSION]}")
|
|
||||||
elif framework[CONF_SOURCE]:
|
|
||||||
cg.add_platformio_option("platform", framework[CONF_SOURCE])
|
cg.add_platformio_option("platform", framework[CONF_SOURCE])
|
||||||
|
elif str(framework[CONF_VERSION]) != "0.0.0":
|
||||||
|
cg.add_platformio_option("platform", f"libretiny @ {framework[CONF_VERSION]}")
|
||||||
else:
|
else:
|
||||||
cg.add_platformio_option("platform", "libretiny")
|
cg.add_platformio_option("platform", "libretiny")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user