Fix Makefile build on OS X
This commit is contained in:
parent
8d4354bb6f
commit
5d2bd8070c
1 changed files with 9 additions and 5 deletions
14
Makefile
14
Makefile
|
@ -1,7 +1,13 @@
|
||||||
.PHONY: vendor docs
|
.PHONY: vendor docs build
|
||||||
|
|
||||||
PACKAGES = $(shell go list ./... | grep -v /vendor/)
|
PACKAGES = $(shell go list ./... | grep -v /vendor/)
|
||||||
|
|
||||||
|
ifneq ($(shell uname), Darwin)
|
||||||
|
EXTLDFLAGS = -extldflags "-static" #
|
||||||
|
else
|
||||||
|
EXTLDFLAGS =
|
||||||
|
endif
|
||||||
|
|
||||||
all: gen build
|
all: gen build
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
|
@ -24,10 +30,8 @@ gen_template:
|
||||||
gen_migrations:
|
gen_migrations:
|
||||||
go generate github.com/drone/drone/store/datastore/ddl
|
go generate github.com/drone/drone/store/datastore/ddl
|
||||||
|
|
||||||
build: build_static
|
build:
|
||||||
|
cd drone && go build --ldflags '${EXTLDFLAGS}-X github.com/drone/drone/version.VersionDev=$(DRONE_BUILD_NUMBER)' -o drone
|
||||||
build_static:
|
|
||||||
cd drone && go build --ldflags '-extldflags "-static" -X github.com/drone/drone/version.VersionDev=$(DRONE_BUILD_NUMBER)' -o drone
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -cover $(PACKAGES)
|
go test -cover $(PACKAGES)
|
||||||
|
|
Loading…
Reference in a new issue