From 4946ec9c3314d930236b34620cf89d0dace63f3b Mon Sep 17 00:00:00 2001 From: peptiderepo <273788462+peptiderepo@users.noreply.github.com> Date: Sat, 13 Jun 2026 14:13:25 +0700 Subject: [PATCH] chore: remove vestigial zip/REST deploy artifacts (0.20.2) Remove scripts/deploy.sh and .distignore which belonged to the retired Code-Snippets REST deploy receiver (prautoblogger-deploy/v1/*). The live pipeline is the shared rsync workflow in peptide-e2e; it uses hardcoded --exclude flags and never reads .distignore. Safety checks: - No workflow in .github/workflows/ references scripts/deploy.sh - peptide-e2e deploy-app.yml confirmed to NOT consume .distignore Version bump: 0.20.1 -> 0.20.2 (patch; no functional change) Agent-Session: cowork-deploy-skill-cleanup --- .distignore | 36 ----------- CHANGELOG.md | 12 +++- prautoblogger.php | 4 +- scripts/deploy.sh | 160 ---------------------------------------------- 4 files changed, 13 insertions(+), 199 deletions(-) delete mode 100755 .distignore delete mode 100755 scripts/deploy.sh diff --git a/.distignore b/.distignore deleted file mode 100755 index 1324b23..0000000 --- a/.distignore +++ /dev/null @@ -1,36 +0,0 @@ -# Files excluded from the production zip. -# Used by the GitHub Actions deploy workflow (rsync --exclude-from). -# Keep in sync with .gitignore for dev-only artifacts. - -.git -.github -.distignore -.gitignore -.phpcs.xml -.editorconfig - -# Development & testing -tests/ -phpunit.xml -phpunit.xml.dist -composer.json -composer.lock -vendor/ - -# Documentation (lives in repo, not in deployed plugin) -ARCHITECTURE.md -CONVENTIONS.md -CHANGELOG.md -CODE_OF_CONDUCT.md -CONTRIBUTING.md - -# CI/CD tooling -scripts/ -node_modules/ -package.json -package-lock.json - -# OS artifacts -.DS_Store -Thumbs.db -*.log diff --git a/CHANGELOG.md b/CHANGELOG.md index 776ddee..3e72d4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to PRAutoBlogger will be documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project uses [Semantic Versioning](https://semver.org/). +## [0.20.2] - 2026-06-13 + +### Removed +- **`scripts/deploy.sh`** — belonged to the retired zip/REST deploy receiver flow + (`/wp-json/prautoblogger-deploy/v1/*`); the live pipeline is the shared rsync workflow + (`peptiderepo/peptide-e2e/.github/workflows/deploy-app.yml@main`). +- **`.distignore`** — used by `scripts/deploy.sh` to build the production zip; no longer + consumed by any workflow (the shared rsync pipeline uses hardcoded `--exclude` flags). + + ## [0.20.1] - 2026-06-12 ### Fixed @@ -1220,4 +1230,4 @@ swap with no user-visible change in article quality. - AJAX-powered "Generate Now" and "Test Connections" buttons. - Custom database tables for source data, analysis results, generation logs, and content scores. - Clean uninstall handler removing all plugin data. -- ARCHITECTURE.md and CONVENTIONS.md for AI-readable codebase documentation. +- ARCHITECTURE.md and CONVENTIONS.md for AI-readable codebase documentation. \ No newline at end of file diff --git a/prautoblogger.php b/prautoblogger.php index 7d297c1..c92216c 100644 --- a/prautoblogger.php +++ b/prautoblogger.php @@ -9,7 +9,7 @@ * Plugin Name: PRAutoBlogger * Plugin URI: https://peptiderepo.com/prautoblogger * Description: Monitors social media for trending topics, generates SEO-friendly blog posts using AI, and publishes them on a daily schedule with full cost tracking and self-improvement metrics. - * Version: 0.20.1 + * Version: 0.20.2 * Requires at least: 6.0 * Requires PHP: 7.4 * Author: PeptideRepo @@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) { | Defined here so every file in the plugin can reference paths, versions, | and limits without magic strings. */ -define( 'PRAUTOBLOGGER_VERSION', '0.20.1' ); +define( 'PRAUTOBLOGGER_VERSION', '0.20.2' ); define( 'PRAUTOBLOGGER_DB_VERSION', '1.3.0' ); define( 'PRAUTOBLOGGER_DEFAULT_RUN_CEILING_USD', 0.50 ); define( 'PRAUTOBLOGGER_DEFAULT_REQUEST_JSON_RETENTION_DAYS', 14 ); diff --git a/scripts/deploy.sh b/scripts/deploy.sh deleted file mode 100755 index a18d03a..0000000 --- a/scripts/deploy.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash -# ============================================================================ -# PRAutoBlogger Manual Deploy Script -# -# Packages the plugin into a clean zip and deploys it to WordPress via the -# deploy-receiver REST endpoint. Use this for hotfixes or local deploys when -# you don't want to go through the full GitHub Actions pipeline. -# -# Usage: -# ./scripts/deploy.sh -# -# Environment variables (set in .env or export before running): -# DEPLOY_URL — Full URL to the deploy endpoint -# DEPLOY_KEY — The deploy authentication token -# -# If not set, the script will look for a .env file in the project root. -# -# @see .github/workflows/deploy.yml — Automated pipeline (same deploy step). -# @see ARCHITECTURE.md — Deploy architecture (Code Snippets snippet #8 on server). -# ============================================================================ - -set -euo pipefail - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" - -# Colors for output. -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -NC='\033[0m' - -info() { echo -e "${GREEN}[deploy]${NC} $*"; } -warn() { echo -e "${YELLOW}[deploy]${NC} $*"; } -error() { echo -e "${RED}[deploy]${NC} $*" >&2; } - -# ── Load environment ──────────────────────────────────────────────────────── - -if [[ -f "$PROJECT_ROOT/.env" ]]; then - # shellcheck source=/dev/null - source "$PROJECT_ROOT/.env" -fi - -if [[ -z "${DEPLOY_URL:-}" ]]; then - error "DEPLOY_URL not set. Export it or add to .env" - exit 1 -fi - -if [[ -z "${DEPLOY_KEY:-}" ]]; then - error "DEPLOY_KEY not set. Export it or add to .env" - exit 1 -fi - -# ── Read version ──────────────────────────────────────────────────────────── - -VERSION=$(grep -oP 'Version:\s*\K[0-9]+\.[0-9]+\.[0-9]+' "$PROJECT_ROOT/prautoblogger.php" || echo "0.0.0") -info "PRAutoBlogger v${VERSION}" - -# ── PHP lint check ────────────────────────────────────────────────────────── - -info "Running PHP syntax check..." -LINT_ERRORS=0 -while IFS= read -r -d '' file; do - if ! php -l "$file" > /dev/null 2>&1; then - error "Syntax error in: $file" - php -l "$file" - LINT_ERRORS=$((LINT_ERRORS + 1)) - fi -done < <(find "$PROJECT_ROOT" -name '*.php' -not -path '*/vendor/*' -not -path '*/tests/*' -not -path '*/.github/*' -print0) - -if [[ $LINT_ERRORS -gt 0 ]]; then - error "$LINT_ERRORS file(s) have syntax errors. Aborting deploy." - exit 1 -fi -info "Lint passed." - -# ── Package ───────────────────────────────────────────────────────────────── - -BUILD_DIR=$(mktemp -d) -PLUGIN_DIR="$BUILD_DIR/prautoblogger" -ZIP_PATH="$BUILD_DIR/prautoblogger-${VERSION}.zip" - -info "Packaging plugin..." - -mkdir -p "$PLUGIN_DIR" - -# Copy production files, excluding dev artifacts. -rsync -a \ - --exclude='.git' \ - --exclude='.github' \ - --exclude='.gitignore' \ - --exclude='.distignore' \ - --exclude='.env' \ - --exclude='.env.local' \ - --exclude='tests/' \ - --exclude='scripts/' \ - --exclude='vendor/' \ - --exclude='node_modules/' \ - --exclude='composer.json' \ - --exclude='composer.lock' \ - --exclude='phpunit.xml' \ - --exclude='phpunit.xml.dist' \ - --exclude='.phpcs.xml' \ - --exclude='ARCHITECTURE.md' \ - --exclude='CONVENTIONS.md' \ - --exclude='CHANGELOG.md' \ - --exclude='build/' \ - --exclude='*.log' \ - --exclude='.DS_Store' \ - "$PROJECT_ROOT/" "$PLUGIN_DIR/" - -cd "$BUILD_DIR" -zip -rq "$ZIP_PATH" prautoblogger/ - -ZIP_SIZE=$(du -h "$ZIP_PATH" | cut -f1) -info "Built ${ZIP_PATH} (${ZIP_SIZE})" - -# ── Pre-deploy health check ──────────────────────────────────────────────── - -STATUS_URL="${DEPLOY_URL%/deploy}/status" -info "Checking deploy endpoint health..." -STATUS_RESPONSE=$(curl -sS -w "\n%{http_code}" \ - -H "X-Deploy-Key: ${DEPLOY_KEY}" \ - "${STATUS_URL}" 2>&1) || true - -STATUS_HTTP=$(echo "$STATUS_RESPONSE" | tail -1) -if [[ "$STATUS_HTTP" == "200" ]]; then - STATUS_BODY=$(echo "$STATUS_RESPONSE" | head -n -1) - info "Endpoint healthy: ${STATUS_BODY}" -else - warn "Health check returned HTTP ${STATUS_HTTP} — proceeding anyway." -fi - -# ── Deploy ────────────────────────────────────────────────────────────────── - -info "Deploying to ${DEPLOY_URL}..." - -RESPONSE=$(curl -sS -w "\n%{http_code}" \ - -X POST "${DEPLOY_URL}" \ - -H "X-Deploy-Key: ${DEPLOY_KEY}" \ - -F "plugin=@${ZIP_PATH}" \ - --max-time 120) - -HTTP_CODE=$(echo "$RESPONSE" | tail -1) -BODY=$(echo "$RESPONSE" | head -n -1) - -if [[ "$HTTP_CODE" -eq 200 ]]; then - info "Deployment successful!" - echo "$BODY" | python3 -m json.tool 2>/dev/null || echo "$BODY" -else - error "Deployment FAILED (HTTP ${HTTP_CODE}):" - echo "$BODY" | python3 -m json.tool 2>/dev/null || echo "$BODY" - rm -rf "$BUILD_DIR" - exit 1 -fi - -# ── Cleanup ───────────────────────────────────────────────────────────────── - -rm -rf "$BUILD_DIR" -info "Done. PRAutoBlogger v${VERSION} is live."