@ -3,7 +3,7 @@
|
||||
dist: bin
|
||||
|
||||
builds:
|
||||
- binary: semaphore
|
||||
- binary: ssh-benchmark
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
main: main.go
|
||||
|
@ -19,14 +19,29 @@ tasks:
|
||||
desc: Install all dependencies (except dredd requirements)
|
||||
cmds:
|
||||
- task: deps:be
|
||||
- task: deps:tools
|
||||
|
||||
deps:be:
|
||||
desc: application dependencies
|
||||
cmds:
|
||||
- go mod tidy
|
||||
|
||||
deps:tools:
|
||||
desc: Installs tools needed for building
|
||||
vars:
|
||||
GORELEASER_VERSION: "0.183.0"
|
||||
cmds:
|
||||
- '{{ if ne OS "windows" }} sh -c "curl -L https://github.com/goreleaser/goreleaser/releases/download/v{{ .GORELEASER_VERSION }}/goreleaser_$(uname -s)_$(uname -m).tar.gz | tar -xz -C $(go env GOPATH)/bin goreleaser"{{ else }} {{ end }}'
|
||||
- '{{ if ne OS "windows" }} chmod +x $(go env GOPATH)/bin/goreleaser{{ else }} {{ end }}'
|
||||
- '{{ if eq OS "windows" }} echo "NOTICE: You must download goreleaser manually to build this application https://github.com/goreleaser/goreleaser/releases "{{ else }}:{{ end }}'
|
||||
- '{{ if eq OS "windows" }} echo "NOTICE: You need to install golangci-lint manually to build this application https://github.com/golangci/golangci-lint#install"{{ else }}{{ end }}'
|
||||
|
||||
build:binary:
|
||||
desc: Build a binary for the current architecture
|
||||
platforms: [amd64]
|
||||
cmds:
|
||||
- env CGO_ENABLED=0 GOOS={{ .GOOS }} GOARCH={{ .GOARCH }} go build -o ./bin/{{.PROJECT_NAME}}{{ if eq OS "windows" }}.exe{{ end }}
|
||||
|
||||
release:prod:
|
||||
cmds:
|
||||
- goreleaser
|
Reference in New Issue
Block a user