tellme/Scripts/build.sh
2025-09-18 19:56:06 +02:00

38 lines
No EOL
872 B
Bash
Executable file

#!/bin/bash
# Build script for Menu-Whisper
# This script builds the project using Swift Package Manager
set -e
echo "🔨 Building Menu-Whisper..."
# Clean previous build
echo "🧹 Cleaning previous build..."
swift package clean
# Build in release mode
echo "⚡ Building in release mode..."
swift build -c release
# Run tests
echo "🧪 Running tests..."
swift test
# Check if SwiftFormat is available and run it
if command -v swiftformat >/dev/null 2>&1; then
echo "📝 Checking code formatting..."
swiftformat --lint .
else
echo "⚠️ SwiftFormat not available, skipping format check"
fi
# Check if SwiftLint is available and run it
if command -v swiftlint >/dev/null 2>&1; then
echo "🔍 Running SwiftLint..."
swiftlint
else
echo "⚠️ SwiftLint not available, skipping lint check"
fi
echo "✅ Build completed successfully!"