Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. .PHONY: build clean install build-all help
  2. # Default target
  3. all: build
  4. # Build for current platform
  5. build:
  6. go build -o letta-schedules
  7. # Build for all platforms
  8. build-all:
  9. GOOS=darwin GOARCH=amd64 go build -o dist/letta-schedules-darwin-amd64
  10. GOOS=darwin GOARCH=arm64 go build -o dist/letta-schedules-darwin-arm64
  11. GOOS=linux GOARCH=amd64 go build -o dist/letta-schedules-linux-amd64
  12. GOOS=linux GOARCH=arm64 go build -o dist/letta-schedules-linux-arm64
  13. GOOS=windows GOARCH=amd64 go build -o dist/letta-schedules-windows-amd64.exe
  14. # Install to /usr/local/bin
  15. install: build
  16. sudo mv letta-schedules /usr/local/bin/
  17. # Clean build artifacts
  18. clean:
  19. rm -f letta-schedules
  20. rm -rf dist/
  21. # Download dependencies
  22. deps:
  23. go mod download
  24. go mod tidy
  25. # Run tests
  26. test:
  27. go test ./...
  28. # Show help
  29. help:
  30. @echo "Available targets:"
  31. @echo " build - Build for current platform"
  32. @echo " build-all - Build for all platforms (creates dist/ directory)"
  33. @echo " install - Build and install to /usr/local/bin"
  34. @echo " clean - Remove build artifacts"
  35. @echo " deps - Download and tidy dependencies"
  36. @echo " test - Run tests"
  37. @echo " help - Show this help message"