fix: upgrade goimports (#23320)

This commit is contained in:
屈轩
2025-09-17 22:01:26 +08:00
committed by GitHub
parent 9dfc3d8df7
commit 5ee016ff02
4 changed files with 5 additions and 4 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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)))