manifest.json
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Koichi Ito 2026-10-10 18:30:22 +09:00
parent 31deb821eb
commit 282f7d4e56
1 changed files with 20 additions and 2 deletions

View File

@ -63,12 +63,30 @@ steps:
commands: commands:
- | - |
if [ "$DRONE_BUILD_EVENT" = "tag" ]; then if [ "$DRONE_BUILD_EVENT" = "tag" ]; then
DEST="/publish/$DRONE_REPO/$DRONE_TAG" VERSION="$DRONE_TAG"
else else
DEST="/publish/$DRONE_REPO/latest" VERSION="latest"
fi fi
DEST="/publish/$DRONE_REPO/$VERSION"
mkdir -p "$DEST" mkdir -p "$DEST"
cp build/bootloader.bin build/partitions.bin build/firmware.bin "$DEST/" cp build/bootloader.bin build/partitions.bin build/firmware.bin "$DEST/"
cat > "$DEST/manifest.json" <<EOF
{
"name": "firmware",
"version": "$VERSION",
"new_install_prompt_erase": true,
"builds": [
{
"chipFamily": "ESP32",
"parts": [
{ "path": "bootloader.bin", "offset": 4096 },
{ "path": "partitions.bin", "offset": 32768 },
{ "path": "firmware.bin", "offset": 65536 }
]
}
]
}
EOF
chmod -R a+rX "/publish/$DRONE_REPO_OWNER" chmod -R a+rX "/publish/$DRONE_REPO_OWNER"
echo "公開先: https://flash.j-code.org/download/${DEST#/publish/}/" echo "公開先: https://flash.j-code.org/download/${DEST#/publish/}/"
when: when: