Skip to content

Commit

Permalink
github
Browse files Browse the repository at this point in the history
Signed-off-by: weizhoublue <[email protected]>
  • Loading branch information
weizhoublue committed Dec 25, 2024
1 parent 34cde23 commit 26d64f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ lint_chart_version:

#================= update golang

GO_VERSION ?= $(shell cat GO_VERSION | tr -d '\n' )
GO_VERSION := $(shell cat GO_VERSION | tr -d '\n' )
GO_IMAGE_VERSION = $(shell awk -F. '{ z=$$3; if (z == "") z=0; print $$1 "." $$2 "." z}' <<< "${GO_VERSION}" )
GO_MAJOR_AND_MINOR_VERSION = $(shell grep -o -E '^[0-9]+\.[0-9]+' <<< "${GO_VERSION}" )

Expand All @@ -107,6 +107,7 @@ update_workflow_golang:
# Update Go version in go.mod
.PHONY: update_mod_golang
update_mod_golang:
GO_MAJOR_AND_MINOR_VERSION=` grep -o -E '^[0-9]+\.[0-9]+' <<< "$(GO_VERSION)" `
GO_MAJOR_AND_MINOR_VERSION=` grep -o -E '^[0-9]+\.[0-9]+' <<< "$(GO_VERSION)" ` ; \
echo "update go.mod to $${GO_MAJOR_AND_MINOR_VERSION}" ; \
sed -i -E 's/^go .*/go '"$${GO_MAJOR_AND_MINOR_VERSION}"'/g' go.mod
Expand Down

0 comments on commit 26d64f6

Please sign in to comment.