manifest.json
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
31deb821eb
commit
282f7d4e56
22
.drone.yml
22
.drone.yml
|
|
@ -63,12 +63,30 @@ steps:
|
|||
commands:
|
||||
- |
|
||||
if [ "$DRONE_BUILD_EVENT" = "tag" ]; then
|
||||
DEST="/publish/$DRONE_REPO/$DRONE_TAG"
|
||||
VERSION="$DRONE_TAG"
|
||||
else
|
||||
DEST="/publish/$DRONE_REPO/latest"
|
||||
VERSION="latest"
|
||||
fi
|
||||
DEST="/publish/$DRONE_REPO/$VERSION"
|
||||
mkdir -p "$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"
|
||||
echo "公開先: https://flash.j-code.org/download/${DEST#/publish/}/"
|
||||
when:
|
||||
|
|
|
|||
Loading…
Reference in New Issue