Update remaining git clones to git fetch (#2779)

Signed-off-by: Loric <117862619+LoricOSC@users.noreply.github.com>
This commit is contained in:
Loric 2024-07-12 00:43:58 -06:00 committed by GitHub
parent 95e31fd279
commit a00e9a82ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions

View file

@ -46,8 +46,13 @@ endif
$(INSTALLED_PACKAGES): grpc_build $(INSTALLED_PACKAGES): grpc_build
$(GRPC_REPO): $(GRPC_REPO):
git clone --depth $(GIT_CLONE_DEPTH) -b $(TAG_LIB_GRPC) $(GIT_REPO_LIB_GRPC) $(GRPC_REPO)/grpc mkdir -p $(GRPC_REPO)/grpc
cd $(GRPC_REPO)/grpc && git submodule update --jobs 2 --init --recursive --depth $(GIT_CLONE_DEPTH) cd $(GRPC_REPO)/grpc && \
git init && \
git remote add origin $(GIT_REPO_LIB_GRPC) && \
git fetch origin && \
git checkout $(TAG_LIB_GRPC) && \
git submodule update --init --recursive --depth 1
$(GRPC_BUILD): $(GRPC_REPO) $(GRPC_BUILD): $(GRPC_REPO)
mkdir -p $(GRPC_BUILD) mkdir -p $(GRPC_BUILD)

View file

@ -1,5 +1,6 @@
LLAMA_VERSION?= LLAMA_VERSION?=
LLAMA_REPO?=https://github.com/ggerganov/llama.cpp
CMAKE_ARGS?= CMAKE_ARGS?=
BUILD_TYPE?= BUILD_TYPE?=
@ -45,11 +46,13 @@ ifeq ($(BUILD_TYPE),sycl_f32)
endif endif
llama.cpp: llama.cpp:
git clone --recurse-submodules https://github.com/ggerganov/llama.cpp llama.cpp mkdir -p llama.cpp
if [ -z "$(LLAMA_VERSION)" ]; then \ cd llama.cpp && \
exit 1; \ git init && \
fi git remote add origin $(LLAMA_REPO) && \
cd llama.cpp && git checkout -b build $(LLAMA_VERSION) && git submodule update --init --recursive --depth 1 git fetch origin && \
git checkout -b build $(LLAMA_VERSION) && \
git submodule update --init --recursive --depth 1
llama.cpp/examples/grpc-server: llama.cpp llama.cpp/examples/grpc-server: llama.cpp
mkdir -p llama.cpp/examples/grpc-server mkdir -p llama.cpp/examples/grpc-server