#!/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!"