Skip to content

Commit ad54f03

Browse files
authored
chore: make the git clone k/k repo with a single specific branch. (#19664)
1 parent b5433ed commit ad54f03

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

update-imported-docs/reference.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ repos:
66
branch: master
77
generate-command: |
88
cd $GOPATH
9-
git clone https://github.com/kubernetes/kubernetes.git src/k8s.io/kubernetes
9+
# set the branch, ex: v1.17.0 while K8S_RELEASE=1.17
10+
# CAUTION: The script won't work if you set K8S_RELEASE=1.18 before 1.18 is formally released.
11+
# The `v${K8S_RELEASE}.0` string must be a valid tag name from the kubernetes repo, which
12+
# is only created after the formal release.
13+
git clone --depth=1 --single-branch --branch v${K8S_RELEASE}.0 https://github.com/kubernetes/kubernetes.git src/k8s.io/kubernetes
1014
cd src/k8s.io/kubernetes
11-
# set the branch, ex: v1.17.0
12-
git checkout v${K8S_RELEASE}.0
1315
make generated_files
1416
cp -L -R vendor $GOPATH/src
1517
rm -r vendor/github.com/spf13/cobra

0 commit comments

Comments
 (0)