mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
Merge pull request #29628 from dims/fix-kubectl-version-extract
Automatic merge from submit-queue kubectl container - Extract version better 1. Use --client since -c is deprecated now 2. The command (./kubectl version --client | grep -o 'GitVersion:"[^"]*"') now returns: GitVersion:"v1.4.0-alpha.1.784+ed3a29bd6aeb98-dirty" so parse out the version better using sed Related to #23708
This commit is contained in:
commit
fe66c5c5fa
@ -27,7 +27,7 @@ kubectl:
|
||||
cp ../../_output/local/bin/$(GOOS)/$(GOARCH)/kubectl .
|
||||
|
||||
.tag: kubectl
|
||||
./kubectl version -c | grep -o 'GitVersion:"[^"]*"' | cut -f 2 -d '"' > .tag
|
||||
./kubectl version --client | grep -o 'GitVersion:"[^"]*"' | sed 's/[^"]*"\([^"+]*\).*/\1/' > .tag
|
||||
|
||||
tag: .tag
|
||||
@echo "Suggest using TAG=$(shell cat .tag)"
|
||||
|
Loading…
Reference in New Issue
Block a user