mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-10 21:46:55 +03:00
Merge pull request #1074 from haverland/rolling
Release creation like CaCo3's update-ota2
This commit is contained in:
58
.github/workflows/build.yaml
vendored
58
.github/workflows/build.yaml
vendored
@@ -158,6 +158,18 @@ jobs:
|
||||
name: "update__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
||||
path: ./dist/*
|
||||
|
||||
- name: Store generated files in cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
./code/.pio/build/esp32cam/firmware.bin
|
||||
./code/.pio/build/esp32cam/partitions.bin
|
||||
./code/.pio/build/esp32cam/bootloader.bin
|
||||
./sd-card/html/version.txt
|
||||
./dist
|
||||
key: ${{ github.run_number }}-pack-for-OTA-v2
|
||||
|
||||
|
||||
|
||||
|
||||
#########################################################################################
|
||||
@@ -181,26 +193,52 @@ jobs:
|
||||
./sd-card/html/version.txt
|
||||
key: ${{ github.run_number }}
|
||||
|
||||
#########################################################################################
|
||||
## Prepare and create release
|
||||
#########################################################################################
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: pack-for-OTA-v2
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get generated files from cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
./code/.pio/build/esp32cam/firmware.bin
|
||||
./code/.pio/build/esp32cam/partitions.bin
|
||||
./code/.pio/build/esp32cam/bootloader.bin
|
||||
./sd-card/html/version.txt
|
||||
./dist
|
||||
key: ${{ github.run_number }}-pack-for-OTA-v2
|
||||
|
||||
- name: Set Variables
|
||||
id: vars
|
||||
run: |
|
||||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
|
||||
- name: Copy artifacts to firmware folder and create initial_esp32_setup.zip
|
||||
|
||||
- name: Prepare artifacts for release
|
||||
run: |
|
||||
ls -la ./dist
|
||||
mkdir -p firmware
|
||||
# copy builds to firmware folder for committing in next step
|
||||
rm -rf firmware/*
|
||||
mkdir -p release
|
||||
# copy builds to firmware folder
|
||||
cp -f "./code/.pio/build/esp32cam/firmware.bin" "firmware/firmware.bin"
|
||||
cp -f "./code/.pio/build/esp32cam/bootloader.bin" "firmware/bootloader.bin"
|
||||
cp -f "./code/.pio/build/esp32cam/partitions.bin" "firmware/partitions.bin"
|
||||
cd sd-card
|
||||
rm -f ../firmware/html.zip
|
||||
rm -f ../firmware/README.md
|
||||
zip -r ../firmware/html.zip html
|
||||
mkdir ../dist
|
||||
cd ../dist
|
||||
zip -r ./firmware/sd-card.zip sd-card
|
||||
# create a update.zip like "update__rolling"
|
||||
cd ./dist
|
||||
zip -r ../release/update.zip .
|
||||
cd ../firmware
|
||||
zip -r ../release/initial_esp32_setup.zip .
|
||||
|
||||
- name: Upload initial_esp32_setup.zip artifact (Firmware + Bootloader + Partitions + Web UI + CNN)
|
||||
|
||||
- name: Upload initial_esp32_setup.zip artifact (Firmware + Bootloader + Partitions + Web UI)
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "initial_esp32_setup__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
||||
@@ -238,7 +276,7 @@ jobs:
|
||||
name: ${{ steps.get_version.outputs.version-without-v }}
|
||||
body: ${{ steps.extract-release-notes.outputs.release_notes }}
|
||||
files: |
|
||||
firmware/*
|
||||
release/*
|
||||
|
||||
|
||||
# Commit&Push Changelog to master branch. Must be manually merged back to rolling
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -7,7 +7,9 @@
|
||||
/sd-card/html/debug/
|
||||
/firmware/
|
||||
version.txt
|
||||
|
||||
/dist/
|
||||
/dist_release/
|
||||
/dist_old_ota
|
||||
CMakeLists.txt.user
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
|
||||
18
Changelog.md
18
Changelog.md
@@ -2,19 +2,15 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [11.3.9] - 2022-09-20
|
||||
|
||||
### Added
|
||||
|
||||
- auto release creation
|
||||
|
||||
### Changed
|
||||
|
||||
- something else
|
||||
- automatic release creation
|
||||
- newest firmware of rolling branch now uploaded to <https://github.com/jomjol/AI-on-the-edge-device/actions>
|
||||
- \#1068 new safer and easier update mechanismn. Use only the update.zip of the release for firmware, html and new models.
|
||||
|
||||
### Fixed
|
||||
|
||||
- \#924 - fix of the Fix
|
||||
- \#1029 wrong change of checkDigitConsistency now working like releases before 11.3.1
|
||||
|
||||
## [10.6.2] - (2022-07-24)
|
||||
|
||||
@@ -571,6 +567,10 @@ External Illumination
|
||||
|
||||
- Initial Version
|
||||
|
||||
[Unreleased]: https://github.com/haverland/AI-on-the-edge-device/compare/11.3.9...HEAD
|
||||
[Unreleased]: https://github.com/haverland/AI-on-the-edge-device/compare/11.4.3...HEAD
|
||||
|
||||
[11.4.3]: https://github.com/haverland/AI-on-the-edge-device/compare/10.6.2...11.4.3
|
||||
|
||||
[11.4.2]: https://github.com/haverland/AI-on-the-edge-device/compare/10.6.2...11.4.2
|
||||
|
||||
[11.3.9]: https://github.com/haverland/AI-on-the-edge-device/compare/10.6.2...11.3.9
|
||||
|
||||
@@ -753,11 +753,12 @@ std::string unzip_new(std::string _in_zip_file, std::string _target_zip, std::st
|
||||
mz_zip_reader_file_stat(&zip_archive, i, &file_stat);
|
||||
sprintf(archive_filename, file_stat.m_filename);
|
||||
|
||||
if (!file_stat.m_is_directory) {
|
||||
// Try to extract all the files to the heap.
|
||||
p = mz_zip_reader_extract_file_to_heap(&zip_archive, archive_filename, &uncomp_size, 0);
|
||||
if (!p)
|
||||
{
|
||||
printf("mz_zip_reader_extract_file_to_heap() failed!\n");
|
||||
printf("mz_zip_reader_extract_file_to_heap() failed on file %s\n", archive_filename);
|
||||
mz_zip_reader_end(&zip_archive);
|
||||
return ret;
|
||||
}
|
||||
@@ -804,6 +805,7 @@ std::string unzip_new(std::string _in_zip_file, std::string _target_zip, std::st
|
||||
// We're done.
|
||||
mz_free(p);
|
||||
}
|
||||
}
|
||||
|
||||
// Close the archive, freeing any resources it was using
|
||||
mz_zip_reader_end(&zip_archive);
|
||||
|
||||
Reference in New Issue
Block a user