Skip to content

Commit 88ab01c

Browse files
committed
fix: golangci install version was not working due to v prefix
1 parent 62a18bc commit 88ab01c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

build/task.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ vars:
5050
COVERPROFILE_UNIQUE: "unique_{{.COVERPROFILE}}"
5151
GOLANGCI_LINT_CONFIG_PATH: '{{.GOLANGCI_LINT_CONFIG_PATH | default ".golangci.yml"}}'
5252
GOLANGCI_LINT_VERSION: v2.9.0
53+
GOLANGCI_LINT_VERSION_WITHOUT_V_PREFIX: # the version found by the package-version-updater contains a 'v' prefix
54+
sh: echo {{.GOLANGCI_LINT_VERSION}} | sed -e "s|v||"
5355
GOLANGCI_LINT_RUN_TIMEOUT_MINUTES: "{{.GOLANGCI_LINT_RUN_TIMEOUT_MINUTES | default 3}}"
5456
GOLANG_PARALLEL_TESTS:
5557
sh: |
@@ -265,8 +267,8 @@ tasks:
265267
cmds:
266268
- task: keep-local-and-remote-versions-in-sync
267269
- |
268-
if ! golangci-lint --version | grep -q "has version {{.GOLANGCI_LINT_VERSION}}"; then
269-
echo "Installing golangci-lint version {{.GOLANGCI_LINT_VERSION}}..."
270+
if ! golangci-lint --version | grep -q "has version {{.GOLANGCI_LINT_VERSION_WITHOUT_V_PREFIX}}"; then
271+
echo "Installing golangci-lint version {{.GOLANGCI_LINT_VERSION_WITHOUT_V_PREFIX}}..."
270272
curl \
271273
-sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh |\
272274
sh -s -- -b {{.GOBIN}} {{.GOLANGCI_LINT_VERSION}}

0 commit comments

Comments
 (0)