Makefile: use shallow clone
Before this change: make clean time make checkout git clone -q "https://github.com/docker/cli.git" src/github.com/docker/cli git clone -q "https://github.com/docker/docker.git" src/github.com/docker/docker 69.16 real 15.69 user 9.69 sys After this change: make clean time make checkout ... From https://github.com/docker/docker * branch HEAD -> FETCH_HEAD git -C src/github.com/docker/docker checkout -q FETCH_HEAD 14.73 real 1.35 user 2.37 sys Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Родитель
d5c1521ca5
Коммит
44eed5234a
12
Makefile
12
Makefile
|
@ -23,7 +23,8 @@ src/github.com/docker/cli:
|
|||
cp -r "$(CLI_DIR)" $@
|
||||
else
|
||||
src/github.com/docker/cli:
|
||||
git clone -q "$(DOCKER_CLI_REPO)" $@
|
||||
git init $@
|
||||
git -C $@ remote add origin "$(DOCKER_CLI_REPO)"
|
||||
endif
|
||||
|
||||
ifdef ENGINE_DIR
|
||||
|
@ -32,16 +33,19 @@ src/github.com/docker/docker:
|
|||
cp -r "$(ENGINE_DIR)" $@
|
||||
else
|
||||
src/github.com/docker/docker:
|
||||
git clone -q "$(DOCKER_ENGINE_REPO)" $@
|
||||
git init $@
|
||||
git -C $@ remote add origin "$(DOCKER_ENGINE_REPO)"
|
||||
endif
|
||||
|
||||
.PHONY: checkout-cli
|
||||
checkout-cli: src/github.com/docker/cli
|
||||
@git -C src/github.com/docker/cli checkout -q "$(DOCKER_CLI_REF)"
|
||||
@git -C src/github.com/docker/cli fetch --depth 1 origin "$(DOCKER_CLI_REF)"
|
||||
@git -C src/github.com/docker/cli checkout -q FETCH_HEAD
|
||||
|
||||
.PHONY: checkout-docker
|
||||
checkout-docker: src/github.com/docker/docker
|
||||
@git -C src/github.com/docker/docker checkout -q "$(DOCKER_ENGINE_REF)"
|
||||
@git -C src/github.com/docker/docker fetch --depth 1 origin "$(DOCKER_ENGINE_REF)"
|
||||
@git -C src/github.com/docker/docker checkout -q FETCH_HEAD
|
||||
|
||||
.PHONY: checkout
|
||||
checkout: checkout-cli checkout-docker ## checkout source at the given reference(s)
|
||||
|
|
Загрузка…
Ссылка в новой задаче