mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:04:02 +03:00
FILE / ScuroNeko/mtg
.mise.toml
Исходный файл и его история в репозитории.
41 lines
942 B
TOML
41 lines
942 B
TOML
[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"
|