mirror of
https://github.com/forkless/Piperless.git
synced 2026-08-17 09:09:49 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bd853ba21 | ||
|
|
a59c4c8ef0 | ||
|
|
c61205cf9b |
@@ -11,7 +11,7 @@ all: translations
|
||||
# ── Build ────────────────────────────────────────────────────────────────────
|
||||
build:
|
||||
@echo "=== Building Piperless ==="
|
||||
./build.sh
|
||||
./tools/build.sh
|
||||
|
||||
# ── Translations ─────────────────────────────────────────────────────────────
|
||||
translations:
|
||||
|
||||
@@ -11,7 +11,6 @@ Piperless converts every published post into a natural-sounding audio transcript
|
||||
|
||||
- **Visually impaired** readers can listen instead of read
|
||||
- **Dyslexic** readers get an alternative format
|
||||
- **Low-literacy** audiences can access your content
|
||||
- **Commuting** readers can consume posts as audio
|
||||
- **Non-native speakers** benefit from hearing correct pronunciation
|
||||
|
||||
|
||||
@@ -13,18 +13,19 @@ set -euo pipefail
|
||||
|
||||
PLUGIN_SLUG="piperless"
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
PROJECT_DIR="$( cd "$SCRIPT_DIR/.." && pwd )"
|
||||
|
||||
# ── Read version from plugin header ───────────────────────────────────────
|
||||
VERSION=$( grep -oP '^\s*\*\s*Version:\s*\K[0-9.]+' "${SCRIPT_DIR}/${PLUGIN_SLUG}.php" | head -1 )
|
||||
VERSION=$( grep -oP '^\s*\*\s*Version:\s*\K[0-9.]+' "${PROJECT_DIR}/${PLUGIN_SLUG}.php" | head -1 )
|
||||
|
||||
if [[ -z "${VERSION}" ]]; then
|
||||
echo "Error: could not determine plugin version from ${PLUGIN_SLUG}.php"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BUILD_DIR="${SCRIPT_DIR}/build"
|
||||
BUILD_DIR="${PROJECT_DIR}/build"
|
||||
STAGING="${BUILD_DIR}/${PLUGIN_SLUG}"
|
||||
ZIP_FILE="${SCRIPT_DIR}/${PLUGIN_SLUG}-${VERSION}.zip"
|
||||
ZIP_FILE="${PROJECT_DIR}/${PLUGIN_SLUG}-${VERSION}.zip"
|
||||
|
||||
echo "=== Piperless Build Script ==="
|
||||
echo "Version: ${VERSION}"
|
||||
@@ -49,7 +50,7 @@ INCLUDE=(
|
||||
)
|
||||
|
||||
for item in "${INCLUDE[@]}"; do
|
||||
src="${SCRIPT_DIR}/${item}"
|
||||
src="${PROJECT_DIR}/${item}"
|
||||
if [[ -e "${src}" ]]; then
|
||||
cp -r "${src}" "${STAGING}/"
|
||||
else
|
||||
@@ -67,7 +68,7 @@ find "${STAGING}" -name '*.map' -delete
|
||||
echo "Creating ZIP archive…"
|
||||
cd "${BUILD_DIR}"
|
||||
zip -r "${ZIP_FILE}" "${PLUGIN_SLUG}" > /dev/null
|
||||
cd "${SCRIPT_DIR}"
|
||||
cd "${PROJECT_DIR}"
|
||||
|
||||
# ── Verify ────────────────────────────────────────────────────────────────
|
||||
ZIP_SIZE=$( du -h "${ZIP_FILE}" | cut -f1 )
|
||||
Reference in New Issue
Block a user