Skip to content

Commit

Permalink
Correctly set chipFamily of esp32 variants (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored May 24, 2022
1 parent 2365fc4 commit 1b754d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
GH_RUNNER_USER_UID = 1001
GH_RUNNER_USER_GID = 121

ESP32_CHIP_FAMILIES = {
"ESP32": "ESP32",
"ESP32S2": "ESP32-S2",
"ESP32S3": "ESP32-S3",
"ESP32C3": "ESP32-C3",
}

if len(sys.argv) != 2:
print("Usage: entrypoint.py <image_file>")
sys.exit(1)
Expand Down Expand Up @@ -87,6 +94,10 @@
break
elif m := re.match(r"USE_ESP32_VARIANT_(\w+)", define):
chip_family = m.group(1)
if chip_family not in ESP32_CHIP_FAMILIES:
raise Exception(f"Unsupported chip family: {chip_family}")

chip_family = ESP32_CHIP_FAMILIES[chip_family]
break

manifest = {
Expand Down

0 comments on commit 1b754d8

Please sign in to comment.