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 3ed9485 commit 34cde23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint-golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.23.4
go-version: 1.23.1

- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -106,7 +106,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.23.4
go-version: 1.23.1

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
# - name: Install Go
# uses: actions/setup-go@v4
# with:
# go-version: 1.23.4
# go-version: 1.23.1

# - name: Checkout code
# uses: actions/checkout@v3
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ update_images_dockerfile_golang:
# Update Go version for GitHub workflow
.PHONY: update_workflow_golang
update_workflow_golang:
GO_IMAGE_VERSION=$$( awk -F. '{ z=$$3; if (z == "") z=0; print $$1 "." $$2 "." z}' <<< "$(GO_VERSION)" ) ; \
GO_IMAGE_VERSION=` awk -F. '{ z=$$3; if (z == "") z=0; print $$1 "." $$2 "." z}' <<< "$(GO_VERSION)" ` ; \
echo "update workflow golang to $${GO_IMAGE_VERSION}" ; \
for fl in $(shell find .github/workflows -name "*.yaml" -print) ; do \
sed -i 's/go-version: .*/go-version: '$${GO_IMAGE_VERSION}'/g' $$fl ; \
Expand All @@ -107,8 +107,9 @@ update_workflow_golang:
# Update Go version in go.mod
.PHONY: update_mod_golang
update_mod_golang:
echo "update go.mod to $(GO_MAJOR_AND_MINOR_VERSION)"
sed -i -E 's/^go .*/go '$(GO_MAJOR_AND_MINOR_VERSION)'/g' go.mod
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/spidernet-io/bmc

go 1.23.0
go 1.23

toolchain go1.23.4

Expand Down

0 comments on commit 34cde23

Please sign in to comment.