Compare commits

...

2 commits

Author SHA1 Message Date
Djuri Baars
ae2e6656df Fix LittleFS sha256 generation 2024-12-18 22:52:50 +01:00
Djuri Baars
c989169ff4 Fix workflow and auto updater webui filenames 2024-12-18 22:20:40 +01:00
4 changed files with 19 additions and 4 deletions

View file

@ -142,7 +142,10 @@ jobs:
shell: bash
run: |
fs_file=$(find .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }} -name "littlefs*.bin")
shasum -a 256 "$fs_file" | awk '{print $1}' > "${fs_file}.sha256"
echo $fs_file
fs_name=$(basename "$fs_file")
shasum -a 256 "$fs_file" | awk '{print $1}' > "${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${fs_name}.sha256"
cat "${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${fs_name}.sha256"
- name: Copy all artifacts to output folder
run: cp .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/*.bin .pio/boot_app0.bin ${{ matrix.chip.name }}_${{ matrix.epd_variant }}

View file

@ -799,6 +799,19 @@ const char* getFirmwareFilename() {
}
}
const char* getWebUiFilename() {
if (HW_REV == "REV_B_EPD_2_13") {
return "littlefs_8MB.bin";
} else if (HW_REV == "REV_A_EPD_2_13") {
return "littlefs_4MB.bin";
} else if (HW_REV == "REV_A_EPD_2_9") {
return "littlefs_4MB.bin";
} else {
return "littlefs_4MB.bin";
}
}
// void loadIcons() {
// size_t ocean_logo_size = 886;

View file

@ -84,5 +84,5 @@ void addScreenMapping(int value, const char* name);
int findScreenIndexByValue(int value);
String replaceAmbiguousChars(String input);
const char* getFirmwareFilename();
const char* getWebUiFilename();
// void loadIcons();

View file

@ -171,14 +171,13 @@ int downloadUpdateHandler(char updateType)
break;
case UPDATE_WEBUI:
{
latestRelease = getLatestRelease("littlefs.bin");
latestRelease = getLatestRelease(getWebUiFilename());
// updateWebUi(latestRelease.fileUrl, U_SPIFFS);
// return 0;
}
break;
}
// First, download the expected SHA256
String expectedSHA256 = downloadSHA256(latestRelease.checksumUrl);
if (expectedSHA256.isEmpty())