@ -3,7 +3,7 @@
|
|||||||
dist: bin
|
dist: bin
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- binary: semaphore
|
- binary: ssh-benchmark
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
main: main.go
|
main: main.go
|
||||||
|
@ -19,14 +19,29 @@ tasks:
|
|||||||
desc: Install all dependencies (except dredd requirements)
|
desc: Install all dependencies (except dredd requirements)
|
||||||
cmds:
|
cmds:
|
||||||
- task: deps:be
|
- task: deps:be
|
||||||
|
- task: deps:tools
|
||||||
|
|
||||||
deps:be:
|
deps:be:
|
||||||
desc: application dependencies
|
desc: application dependencies
|
||||||
cmds:
|
cmds:
|
||||||
- go mod tidy
|
- 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:
|
build:binary:
|
||||||
desc: Build a binary for the current architecture
|
desc: Build a binary for the current architecture
|
||||||
platforms: [amd64]
|
platforms: [amd64]
|
||||||
cmds:
|
cmds:
|
||||||
- env CGO_ENABLED=0 GOOS={{ .GOOS }} GOARCH={{ .GOARCH }} go build -o ./bin/{{.PROJECT_NAME}}{{ if eq OS "windows" }}.exe{{ end }}
|
- 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