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