Skip to content

Commit 9d0befc

Browse files
committed
Allow snapshotting in forked repo
Signed-off-by: Tareque Hossain <thossain@nvidia.com>
1 parent ae7001c commit 9d0befc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,14 @@ core-proto-clean:
225225
rm -rf workflow-schema/site-agent/workflows/v1/*_carbide.proto
226226
rm -rf workflow-schema/schema/site-agent/workflows/v1/*.pb.go
227227

228+
core-proto-repo ?= NVIDIA/ncx-infra-controller-core
229+
core-proto-repo-ssh:=ssh://git@github.com/$(core-proto-repo).git
230+
core-proto-ref ?= origin/main
228231
core-proto-fetch:
229-
if [ -d "nico-core" ]; then cd nico-core && git fetch origin && git reset --hard origin/main; else git clone ssh://git@github.com/NVIDIA/ncx-infra-controller-core.git nico-core; fi
232+
@echo "Fetching Core protobuf files from $(core-proto-repo-ssh) at $(core-proto-ref). Customize with make core-proto-repo=your-repo core-proto-ref=your-ref"
233+
if [ -d "nico-core" ]; then rm -rf nico-core; fi
234+
git clone $(core-proto-repo-ssh) nico-core;
235+
cd nico-core && git fetch $(core-proto-repo-ssh) && git reset --hard $(core-proto-ref);
230236
ls nico-core/crates/rpc/proto
231237
@for file in nico-core/crates/rpc/proto/*.proto; do \
232238
cp "$$file" "workflow-schema/site-agent/workflows/v1/$$(basename "$$file" .proto)_carbide.proto"; \

0 commit comments

Comments
 (0)