Files
basil/scripts/version.sh
Paul R Kartchner 0945d8f3e1
Some checks failed
CI Pipeline / Lint Code (pull_request) Has been cancelled
CI Pipeline / Test API Package (pull_request) Has been cancelled
CI Pipeline / Test Web Package (pull_request) Has been cancelled
CI Pipeline / Test Shared Package (pull_request) Has been cancelled
CI Pipeline / Build All Packages (pull_request) Has been cancelled
CI Pipeline / Generate Coverage Report (pull_request) Has been cancelled
Docker Build & Deploy / Build Docker Images (pull_request) Has been cancelled
Docker Build & Deploy / Push Docker Images (pull_request) Has been cancelled
Docker Build & Deploy / Deploy to Staging (pull_request) Has been cancelled
Docker Build & Deploy / Deploy to Production (pull_request) Has been cancelled
E2E Tests / End-to-End Tests (pull_request) Has been cancelled
E2E Tests / E2E Tests (Mobile) (pull_request) Has been cancelled
Security Scanning / NPM Audit (pull_request) Has been cancelled
Security Scanning / Dependency License Check (pull_request) Has been cancelled
Security Scanning / Code Quality Scan (pull_request) Has been cancelled
Security Scanning / Docker Image Security (pull_request) Has been cancelled
Security Scanning / Security Summary (pull_request) Has been cancelled
feat: upgrade recipe scraper to Python recipe-scrapers library (v2025.10.1)
## Changes

### Recipe Scraper Enhancement
- Replaced custom Cheerio-based scraper with Python recipe-scrapers library
- Now supports 541+ recipe websites (same as Mealie)
- Added Python 3 and recipe-scrapers to Docker container
- Created Python wrapper script (packages/api/scripts/scrape_recipe.py)
- Updated scraper service to call Python script via subprocess

### Bug Fixes
- Fixed servings field parsing (string to integer conversion)
- Added safe extraction with graceful error handling
- Removed obsolete test file that was breaking builds
- Fixed Prisma binary targets for Alpine Linux

### Infrastructure
- Added Traefik configuration for HTTPS with Let's Encrypt
- Updated CORS settings for production domain
- Configured for basil.pkartchner.com

### Version Management
- Implemented CalVer versioning (Year.Month.Increment)
- Added VERSION file (2025.10.1)
- Created version.sh script for managing releases
- Tagged and pushed Docker images to Harbor registry

### Database
- Updated Prisma schema with correct binary targets
- Applied initial migration for all tables

### Build Improvements
- Excluded test files from TypeScript compilation
- Removed non-existent dependencies
- Optimized Docker build process

## Testing
- Successfully tested with Food Network, Bon Appetit, Food.com
- Verified full import and save workflow
- Confirmed ingredients and instructions display correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 17:51:39 +00:00

87 lines
2.3 KiB
Bash
Executable File

#!/bin/bash
# Version management script for Basil
set -e
VERSION_FILE="VERSION"
# Get current version
get_version() {
if [ -f "$VERSION_FILE" ]; then
cat "$VERSION_FILE" | tr -d '\n'
else
echo "2025.10.1"
fi
}
# Increment version (bump the increment part)
bump_version() {
current=$(get_version)
year=$(echo "$current" | cut -d. -f1)
month=$(echo "$current" | cut -d. -f2)
increment=$(echo "$current" | cut -d. -f3)
current_year=$(date +%Y)
current_month=$(date +%-m)
# If year or month changed, reset increment to 1
if [ "$year" != "$current_year" ] || [ "$month" != "$current_month" ]; then
new_version="${current_year}.${current_month}.1"
else
# Otherwise increment
increment=$((increment + 1))
new_version="${year}.${month}.${increment}"
fi
echo "$new_version" > "$VERSION_FILE"
echo "$new_version"
}
# Tag and push Docker images
tag_and_push() {
version=$(get_version)
echo "Tagging and pushing version: $version"
# Tag API
docker tag basil-api "harbor.pkartchner.com/basil/api:${version}"
docker tag basil-api "harbor.pkartchner.com/basil/api:latest"
# Tag Web
docker tag basil-web "harbor.pkartchner.com/basil/web:${version}"
docker tag basil-web "harbor.pkartchner.com/basil/web:latest"
# Push all tags
echo "Pushing harbor.pkartchner.com/basil/api:${version}"
docker push "harbor.pkartchner.com/basil/api:${version}"
echo "Pushing harbor.pkartchner.com/basil/api:latest"
docker push "harbor.pkartchner.com/basil/api:latest"
echo "Pushing harbor.pkartchner.com/basil/web:${version}"
docker push "harbor.pkartchner.com/basil/web:${version}"
echo "Pushing harbor.pkartchner.com/basil/web:latest"
docker push "harbor.pkartchner.com/basil/web:latest"
echo "Successfully pushed version $version to Harbor"
}
# Main command handler
case "${1:-}" in
get)
get_version
;;
bump)
bump_version
;;
push)
tag_and_push
;;
*)
echo "Usage: $0 {get|bump|push}"
echo " get - Show current version"
echo " bump - Increment version number"
echo " push - Tag and push current version to Harbor"
exit 1
;;
esac