mirror of
https://github.com/aykhans/dodo.git
synced 2025-07-02 00:16:20 +00:00
🔧 Refactor .golangci and Taskfile
This commit is contained in:
@ -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}}
|
||||
{{- 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"
|
||||
|
Reference in New Issue
Block a user