mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-30 10:11:23 +02:00
Merge pull request #1638 from makhmutov/master
Fix Makefile build on OS X
This commit is contained in:
commit
20a54a10ab
14
Makefile
14
Makefile
@ -1,7 +1,13 @@
|
||||
.PHONY: vendor docs
|
||||
.PHONY: vendor docs build
|
||||
|
||||
PACKAGES = $(shell go list ./... | grep -v /vendor/)
|
||||
|
||||
ifneq ($(shell uname), Darwin)
|
||||
EXTLDFLAGS = -extldflags "-static" $(null)
|
||||
else
|
||||
EXTLDFLAGS =
|
||||
endif
|
||||
|
||||
all: gen build
|
||||
|
||||
deps:
|
||||
@ -24,10 +30,8 @@ gen_template:
|
||||
gen_migrations:
|
||||
go generate github.com/drone/drone/store/datastore/ddl
|
||||
|
||||
build: build_static
|
||||
|
||||
build_static:
|
||||
cd drone && go build --ldflags '-extldflags "-static" -X github.com/drone/drone/version.VersionDev=$(DRONE_BUILD_NUMBER)' -o drone
|
||||
build:
|
||||
cd drone && go build --ldflags '${EXTLDFLAGS}-X github.com/drone/drone/version.VersionDev=$(DRONE_BUILD_NUMBER)' -o drone
|
||||
|
||||
test:
|
||||
go test -cover $(PACKAGES)
|
||||
|
Loading…
Reference in New Issue
Block a user