-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 765 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 765 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
28
29
EXTENSION:=
ifeq ($(OS),Windows_NT)
EXTENSION:=.exe
endif
all: bin
PKG_NAME := github.com/docker/compose-switch
LDFLAGS="-s -w -X $(PKG_NAME)/internal.Version=${GIT_TAG}"
bin:
CGO_ENABLED=0 go build -ldflags=$(LDFLAGS) -o bin/docker-compose$(EXTENSION) ./main.go
cross:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags=$(LDFLAGS) -o bin/docker-compose-linux-amd64 .
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags=$(LDFLAGS) -o bin/docker-compose-linux-arm64 .
test:
go test -cover ./...
test-ubuntu-install:
docker build -f ubuntu-test.Dockerfile .
test-centos-install:
docker build -f centos-test.Dockerfile .
test-install: test-centos-install test-ubuntu-install
.PHONY: bin cross test test-ubuntu-install test-centos-install