forked from Yandex-Practicum/go-autotests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
24 lines (18 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
SHELL=/bin/bash
AUTOTESTS = gophermarttest metricstest devopstest shortenertest shortenertestbeta
UTILS = random statictest shortenerstress
all: prep autotests utils perm
prep:
go mod tidy
autotests:
$(foreach TARGET,$(AUTOTESTS),GOOS=linux GOARCH=amd64 go test -c -o=bin/$(TARGET)-linux-amd64 -o=bin/$(TARGET) ./cmd/$(TARGET)/... ;)
$(foreach TARGET,$(AUTOTESTS),GOOS=windows GOARCH=amd64 go test -c -o=bin/$(TARGET)-windows-amd64.exe ./cmd/$(TARGET)/... ;)
$(foreach TARGET,$(AUTOTESTS),GOOS=darwin GOARCH=amd64 go test -c -o=bin/$(TARGET)-darwin-amd64 ./cmd/$(TARGET)/... ;)
$(foreach TARGET,$(AUTOTESTS),GOOS=darwin GOARCH=arm64 go test -c -o=bin/$(TARGET)-darwin-arm64 ./cmd/$(TARGET)/... ;)
utils:
$(foreach TARGET,$(UTILS),GOOS=linux GOARCH=amd64 go build -buildvcs=false -o=bin/$(TARGET)-linux-amd64 -o=bin/$(TARGET) ./cmd/$(TARGET)/... ;)
$(foreach TARGET,$(UTILS),GOOS=windows GOARCH=amd64 go build -buildvcs=false -o=bin/$(TARGET)-windows-amd64.exe ./cmd/$(TARGET)/... ;)
$(foreach TARGET,$(UTILS),GOOS=darwin GOARCH=amd64 go build -buildvcs=false -o=bin/$(TARGET)-darwin-amd64 ./cmd/$(TARGET)/... ;)
$(foreach TARGET,$(UTILS),GOOS=darwin GOARCH=arm64 go build -buildvcs=false -o=bin/$(TARGET)-darwin-arm64 ./cmd/$(TARGET)/... ;)
perm:
chmod -R +x bin