Update Makefile for multi-platform builds and remove obsolete test scripts
- Added new build targets in the Makefile for macOS (Intel and Apple Silicon) and a target to build for all platforms. - Removed outdated test scripts for server and Swagger documentation testing that are no longer needed. - Cleaned up the project structure by deleting unnecessary files to streamline the build process.
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
help:
|
||||
@echo "Available targets:"
|
||||
@echo " build - Build the web server"
|
||||
@echo " build-mac - Build for macOS (Intel)"
|
||||
@echo " build-mac-arm64 - Build for macOS (Apple Silicon)"
|
||||
@echo " build-all - Build for all platforms"
|
||||
@echo " run - Run the web server"
|
||||
@echo " test - Run tests"
|
||||
@echo " clean - Clean build artifacts"
|
||||
@@ -19,6 +22,24 @@ build:
|
||||
@go build -o bin/web ./cmd/web
|
||||
@echo "Build completed successfully!"
|
||||
|
||||
# Build for macOS (Intel)
|
||||
build-mac:
|
||||
@echo "Building web server for macOS (Intel)..."
|
||||
@mkdir -p bin
|
||||
@GOOS=darwin GOARCH=amd64 go build -o bin/web-mac ./cmd/web
|
||||
@echo "macOS Intel build completed successfully!"
|
||||
|
||||
# Build for macOS (Apple Silicon)
|
||||
build-mac-arm64:
|
||||
@echo "Building web server for macOS (Apple Silicon)..."
|
||||
@mkdir -p bin
|
||||
@GOOS=darwin GOARCH=arm64 go build -o bin/web-mac-arm64 ./cmd/web
|
||||
@echo "macOS ARM64 build completed successfully!"
|
||||
|
||||
# Build for all platforms
|
||||
build-all: build build-mac build-mac-arm64
|
||||
@echo "All platform builds completed successfully!"
|
||||
|
||||
# Run the web server
|
||||
run: build
|
||||
@echo "Starting web server..."
|
||||
|
||||
Reference in New Issue
Block a user