-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (21 loc) · 971 Bytes
/
Makefile
File metadata and controls
27 lines (21 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
APP_NAME = azdevops
VERSION ?= dev
DIST_DIR = dist
.PHONY: all build clean
all: build
build: clean
@echo "🔧 Compilando binarios para múltiples plataformas..."
GOOS=linux GOARCH=amd64 go build -o $(DIST_DIR)/$(VERSION)/linux-amd64/$(APP_NAME)
GOOS=linux GOARCH=arm64 go build -o $(DIST_DIR)/$(VERSION)/linux-arm64/$(APP_NAME)
GOOS=darwin GOARCH=amd64 go build -o $(DIST_DIR)/$(VERSION)/darwin-amd64/$(APP_NAME)
GOOS=darwin GOARCH=arm64 go build -o $(DIST_DIR)/$(VERSION)/darwin-arm64/$(APP_NAME)
GOOS=windows GOARCH=amd64 go build -o $(DIST_DIR)/$(VERSION)/windows-amd64/$(APP_NAME).exe
@echo "✅ Binarios generados en la carpeta $(DIST_DIR)"
clean:
@echo "🧹 Limpiando binarios anteriores..."
rm -rf $(DIST_DIR)/*
mkdir -p $(DIST_DIR)/$(VERSION)/linux-amd64
mkdir -p $(DIST_DIR)/$(VERSION)/linux-arm64
mkdir -p $(DIST_DIR)/$(VERSION)/darwin-amd64
mkdir -p $(DIST_DIR)/$(VERSION)/darwin-arm64
mkdir -p $(DIST_DIR)/$(VERSION)/windows-amd64