From 439f66eb87a7acf92e73799f90a6b1f422836a4b Mon Sep 17 00:00:00 2001 From: Aykhan Shahsuvarov Date: Thu, 3 Apr 2025 03:07:38 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Refactor=20.golangci=20and=20Tas?= =?UTF-8?q?kfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .golangci.yml | 4 +++- Taskfile.yaml | 23 ++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index e8e7d48..1b9de2b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,10 +1,12 @@ +version: "2" + run: go: "1.24" concurrency: 8 timeout: 10m linters: - disable-all: true + default: none enable: - asasalint - asciicheck diff --git a/Taskfile.yaml b/Taskfile.yaml index f199bd9..09315aa 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -26,15 +26,16 @@ tasks: silent: true cmds: - rm -rf binaries - - for: { var: PLATFORMS, as: PLATFORM } - cmd: | - {{ $ext := "" }} + - | + {{ $ext := "" }} + {{- range $platform := .PLATFORMS }} + {{- if eq $platform.os "windows" }} + {{ $ext = ".exe" }} + {{- end }} - {{ if eq $.PLATFORM.os "windows" }} - {{ $ext = ".exe" }} - {{ end }} - - {{range $arch := $.PLATFORM.archs}} - echo "Building for {{$.PLATFORM.os}}/{{$arch}}" - GOOS={{$.PLATFORM.os}} GOARCH={{$arch}} go build -ldflags "-s -w" -o "./binaries/dodo-{{$.PLATFORM.os}}-{{$arch}}{{$ext}}" - {{end}} \ No newline at end of file + {{- range $arch := $platform.archs }} + echo "Building for {{$platform.os}}/{{$arch}}" + GOOS={{$platform.os}} GOARCH={{$arch}} go build -ldflags "-s -w" -o "./binaries/dodo-{{$platform.os}}-{{$arch}}{{$ext}}" + {{- end }} + {{- end }} + - echo -e "\033[32m*** Build completed ***\033[0m"