🔧 Refactor .golangci and Taskfile

This commit is contained in:
Aykhan Shahsuvarov 2025-04-03 03:07:38 +04:00
parent 046ce74cd9
commit 439f66eb87
2 changed files with 15 additions and 12 deletions

View File

@ -1,10 +1,12 @@
version: "2"
run: run:
go: "1.24" go: "1.24"
concurrency: 8 concurrency: 8
timeout: 10m timeout: 10m
linters: linters:
disable-all: true default: none
enable: enable:
- asasalint - asasalint
- asciicheck - asciicheck

View File

@ -26,15 +26,16 @@ tasks:
silent: true silent: true
cmds: cmds:
- rm -rf binaries - rm -rf binaries
- for: { var: PLATFORMS, as: PLATFORM } - |
cmd: |
{{ $ext := "" }} {{ $ext := "" }}
{{- range $platform := .PLATFORMS }}
{{ if eq $.PLATFORM.os "windows" }} {{- if eq $platform.os "windows" }}
{{ $ext = ".exe" }} {{ $ext = ".exe" }}
{{ end }} {{- end }}
{{range $arch := $.PLATFORM.archs}} {{- range $arch := $platform.archs }}
echo "Building for {{$.PLATFORM.os}}/{{$arch}}" echo "Building for {{$platform.os}}/{{$arch}}"
GOOS={{$.PLATFORM.os}} GOARCH={{$arch}} go build -ldflags "-s -w" -o "./binaries/dodo-{{$.PLATFORM.os}}-{{$arch}}{{$ext}}" GOOS={{$platform.os}} GOARCH={{$arch}} go build -ldflags "-s -w" -o "./binaries/dodo-{{$platform.os}}-{{$arch}}{{$ext}}"
{{end}} {{- end }}
{{- end }}
- echo -e "\033[32m*** Build completed ***\033[0m"