[tools] go = "latest" gofumpt = "latest" [tasks.build] description = "Build binary" sources = ["**/*.go", "go.mod", "go.sum"] outputs = ["mtg"] run = "go build" [tasks.static] description = "Build static binary" sources = ["**/*.go", "go.mod", "go.sum"] outputs = ["mtg"] run = """ #!/bin/bash version="$(git describe --exact-match HEAD 2>/dev/null || git describe --tags --always)" go build \ -trimpath \ -mod=readonly \ -ldflags="-extldflags '-static' -s -w -X 'main.version=$version'" \ -a \ -tags netgo """ [tasks.release] description = "Create release tarballs" tools.goreleaser = "latest" sources = ["**/*.go", "go.mod", "go.sum", ".goreleaser.yml"] run = [ "goreleaser --snapshot --clean", "find dist -depth 1 -type d | xargs -r rm -r", "rm ./dist/config.yaml" ] [tasks.docs] description = "Run doc server" tools."go:golang.org/x/pkgsite/cmd/pkgsite" = "latest" run = "pkgsite -http 0.0.0.0:10000"