Skip to content

Commit 1c55bce

Browse files
committed
Remove share_env from Makefile
1 parent a1c2fdd commit 1c55bce

2 files changed

Lines changed: 10 additions & 27 deletions

File tree

‎Makefile‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,27 @@ ROOT := $(shell pwd)
1515

1616
all: build
1717

18-
SOURCEDIR=./ecs-cli
18+
SOURCEDIR := ./ecs-cli
1919
SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
20-
LOCAL_BINARY=bin/local/ecs-cli
21-
LINUX_BINARY=bin/linux-amd64/ecs-cli
22-
DARWIN_BINARY=bin/darwin-amd64/ecs-cli
20+
LOCAL_BINARY := bin/local/ecs-cli
21+
LINUX_BINARY := bin/linux-amd64/ecs-cli
22+
DARWIN_BINARY := bin/darwin-amd64/ecs-cli
23+
LOCAL_PATH := $(ROOT)/scripts:${PATH}
2324

2425
.PHONY: build
2526
build: $(LOCAL_BINARY)
2627

2728
$(LOCAL_BINARY): $(SOURCES)
28-
. ./scripts/shared_env && ./scripts/build_binary.sh ./bin/local
29+
./scripts/build_binary.sh ./bin/local
2930
@echo "Built ecs-cli"
3031

3132
.PHONY: test
3233
test:
33-
. ./scripts/shared_env && env -i PATH=$$PATH GOPATH=$$GOPATH GOROOT=$$GOROOT go test -timeout=120s -v -cover ./ecs-cli/license/... ./ecs-cli/modules/...
34+
env -i PATH=$$PATH GOPATH=$$GOPATH GOROOT=$$GOROOT go test -timeout=120s -v -cover ./ecs-cli/license/... ./ecs-cli/modules/...
3435

3536
.PHONY: generate
3637
generate: $(SOURCES)
37-
. ./scripts/shared_env && go generate ./ecs-cli/license/... ./ecs-cli/modules/...
38+
PATH=$(LOCAL_PATH) go generate ./ecs-cli/license/... ./ecs-cli/modules/...
3839

3940
.PHONY: generate-deps
4041
generate-deps:
@@ -61,12 +62,12 @@ supported-platforms: $(LINUX_BINARY) $(DARWIN_BINARY)
6162

6263
$(LINUX_BINARY): $(SOURCES)
6364
@mkdir -p ./bin/linux-amd64
64-
. ./scripts/shared_env && TARGET_GOOS=linux GOARCH=amd64 ./scripts/build_binary.sh ./bin/linux-amd64
65+
TARGET_GOOS=linux GOARCH=amd64 ./scripts/build_binary.sh ./bin/linux-amd64
6566
@echo "Built ecs-cli for linux"
6667

6768
$(DARWIN_BINARY): $(SOURCES)
6869
@mkdir -p ./bin/darwin-amd64
69-
. ./scripts/shared_env && TARGET_GOOS=darwin GOARCH=amd64 ./scripts/build_binary.sh ./bin/darwin-amd64
70+
TARGET_GOOS=darwin GOARCH=amd64 ./scripts/build_binary.sh ./bin/darwin-amd64
7071
@echo "Built ecs-cli for darwin"
7172

7273
.PHONY: clean

‎scripts/shared_env‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)