You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
770 B

.PHONY: clean
VERSION :=v0.8.7
GOPATH :=$(shell pwd)/$(DRONE_SRC)/.go
all: drone-agent drone-server
drone-agent: $(DRONE_SRC) checkout-version $(GOPATH)
cd $(DRONE_SRC) && go get -v
cp $(GOPATH)/bin/$@ $@
drone-server: $(DRONE_SRC) checkout-version $(GOPATH)
cd $(DRONE_SRC) && CGO_ENABLED=0 go get -v
cp $(GOPATH)/bin/$@ $@
mkdir -p $@/src/
ln -sf $(shell pwd)/$(DRONE_SRC) $(GOPATH)/src/
git clone $@
checkout-version: $(DRONE_SRC)
cd $(DRONE_SRC) && git checkout --force --quiet $(VERSION)
rm -f drone
rm -rf drone-*