bd1cd17490
build.sh now updates the version in README.md from manifest.json before creating the ZIP package. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
626 B
Bash
Executable File
17 lines
626 B
Bash
Executable File
#!/bin/bash
|
|
# Build extension ZIP package
|
|
set -euo pipefail
|
|
VERSION=$(python3 -c "import json; print(json.load(open('manifest.json'))['version'])")
|
|
MODULE=$(python3 -c "import json; m=json.load(open('manifest.json')); print(m.get('module', m['name']))")
|
|
ZIPNAME="${MODULE}-${VERSION}.zip"
|
|
|
|
# Update version in README.md if it exists
|
|
if [[ -f README.md ]]; then
|
|
sed -i "s/\*\*גרסה:\*\* [^ |]*/\*\*גרסה:\*\* ${VERSION}/" README.md
|
|
fi
|
|
echo "Building $ZIPNAME..."
|
|
rm -f "$ZIPNAME"
|
|
zip -r "$ZIPNAME" manifest.json files/ \
|
|
-x "*.DS_Store" "*__MACOSX*" "*.zip"
|
|
echo "✓ Built: $ZIPNAME ($(du -h "$ZIPNAME" | cut -f1))"
|