version: '3' env: CGO_ENABLED: 0 GOBIN: "{{.USER_WORKING_DIR}}/bin" PROJECT: "git.loyso.art/frx/kurious" vars: GIT_COMMIT: sh: git log -n 1 --format=%h GIT_VERSION: sh: git tag | sort -r --version-sort | head -n1 BUILD_TIME: sh: TZ=UTC date --iso-8601=seconds LDFLAGS: sh: echo '-X "{{.PROJECT}}.buildTime={{.BUILD_TIME}}" -X "{{.PROJECT}}.commit={{.GIT_COMMIT}}" -X "{{.PROJECT}}.version={{.GIT_VERSION}}"' tasks: install_tools: cmds: - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 check: cmds: - "$GOBIN/golangci-lint run ./..." test: cmds: - go test --count=1 ./internal/... build: cmds: - go build -o $GOBIN/sravnicli -v -ldflags '{{.LDFLAGS}}' cmd/dev/sravnicli/main.go deps: [check, test] run: deps: [build] cmds: - $GOBIN/sravnicli