Commit 4e6631a
Changed files (1)
Makefile
@@ -6,7 +6,6 @@ BINARY_NAME=buylater
BINARY_PATH=./cmd/web
BUILD_DIR=./bin
-# Build the application
build:
@echo "Unpacking vendor dependencies..."
@go run tools/vendor/unpack.go
@@ -15,18 +14,14 @@ build:
@go build -o $(BUILD_DIR)/$(BINARY_NAME) $(BINARY_PATH)
@echo "Build complete: $(BUILD_DIR)/$(BINARY_NAME)"
-# Lint code (vet + format check)
lint:
@echo "Linting code..."
@go vet ./...
- @test -z "$$(gofmt -l .)" || (echo "Code not formatted, run 'make fmt'" && exit 1)
-# Format code
fmt:
@echo "Formatting code..."
@go fmt ./...
-# Update dependencies and vendor
update:
@echo "Updating dependencies..."
@go mod tidy
@@ -35,9 +30,8 @@ update:
@go run tools/vendor/pack.go
@echo "Dependencies updated and vendored"
-# Run tests
test:
@echo "Unpacking vendor dependencies..."
@go run tools/vendor/unpack.go
@echo "Running tests..."
- @go test ./...
\ No newline at end of file
+ @go test ./...