From 5ee016ff0202f238f1fa648ecc7c9da71f81f615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=88=E8=BD=A9?= Date: Wed, 17 Sep 2025 22:01:26 +0800 Subject: [PATCH] fix: upgrade goimports (#23320) --- .circleci/config.yml | 2 +- .github/workflows/ci-pr-build-test.yml | 2 +- Makefile | 3 ++- Makefile.common.mk | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f4cfd62f3a..a33e4a74c9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: requires: - check docker: - - image: yunion/centos-build:go-1.21.10-0 + - image: yunion/alpine-build:3.22.0-go-1.24.6-1 environment: ONECLOUD_CI_BUILD: "1" diff --git a/.github/workflows/ci-pr-build-test.yml b/.github/workflows/ci-pr-build-test.yml index a489c4f40b..d6b7538a8c 100644 --- a/.github/workflows/ci-pr-build-test.yml +++ b/.github/workflows/ci-pr-build-test.yml @@ -19,7 +19,7 @@ jobs: shell: bash run: | set -o xtrace - git clone --branch yun --depth 4 https://github.com/yousong/tools && cd tools + git clone --branch master --depth 4 https://github.com/yunionio/tools && cd tools go build ./cmd/goimports && sudo cp goimports /usr/bin/ && cd .. && rm -rf tools git clone --depth 4 https://github.com/yousong/y18n && cd y18n go build . && sudo cp y18n /usr/bin && cd .. && rm -rf y18n diff --git a/Makefile b/Makefile index 22548c8fa3..94bc63f3ed 100644 --- a/Makefile +++ b/Makefile @@ -181,7 +181,8 @@ goimports-check: echo "$@: working tree modified (possibly by goimports)" >&2 ; \ echo "$@: " >&2 ; \ echo "$@: import spec should be grouped in order: std, 3rd-party, yunion.io/x, yunion.io/x/onecloud" >&2 ; \ - echo "$@: see \"yun\" branch at https://github.com/yousong/tools" >&2 ; \ + echo "$@: goimports should be installed by: \ + echo "$@: git clone --depth 4 https://github.com/yunionio/tools && cd tools && go install ./cmd/goimports ; \ false ; \ fi .PHONY: goimports-check diff --git a/Makefile.common.mk b/Makefile.common.mk index ec1136cbf3..6407b21175 100644 --- a/Makefile.common.mk +++ b/Makefile.common.mk @@ -8,7 +8,7 @@ endif ModBaseName:=$(notdir $(ModName)) DockerImageRegistry?=registry.cn-beijing.aliyuncs.com -DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.22.0-go-1.24.6-0 +DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.22.0-go-1.24.6-1 DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:go-1.21.10-0 EnvIf=$(if $($(1)),$(1)=$($(1)))