Merge pull request #15936 from Moleus/development

Fix build environment name check for esp32.
This commit is contained in:
Jason2866 2022-07-06 21:59:32 +02:00 committed by GitHub
commit 67d3b76c29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -41,8 +41,9 @@ variants_dir = join(FRAMEWORK_DIR, "variants", "tasmota")
def esp32_create_chip_string(chip): def esp32_create_chip_string(chip):
tasmota_platform = env.subst("$BUILD_DIR").split(os.path.sep)[-1] tasmota_platform = env.subst("$BUILD_DIR").split(os.path.sep)[-1]
tasmota_platform = tasmota_platform.split('-')[0] tasmota_platform = tasmota_platform.split('-')[0]
if 'tasmota' and chip[3:] not in tasmota_platform: # quick check for a valid name like 'tasmota' + '32c3' if 'tasmota' + chip[3:] not in tasmota_platform: # quick check for a valid name like 'tasmota' + '32c3'
print('Unexpected naming conventions in this build environment -> Undefined behavior for further build process!!') print('Unexpected naming conventions in this build environment -> Undefined behavior for further build process!!')
print("Expected build environment name like 'tasmota32-whatever-you-want'")
return tasmota_platform return tasmota_platform
def esp32_build_filesystem(fs_size): def esp32_build_filesystem(fs_size):