Files
jellybit/Taskfile.yml
T
2026-06-14 11:35:14 +03:00

62 lines
1.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# yaml-language-server: $schema=https://taskfile.dev/schema.json
#
# Запуск команд проекта через Task (https://taskfile.dev).
# Список задач: `task --list`.
version: '3'
vars:
BINARY: jellybit
PKG: ./cmd/jellybit
# Версия линтера для воспроизводимой установки (см. задачу setup).
GOLANGCI_VERSION: v2.12.2
tasks:
default:
desc: Список доступных задач
cmds:
- task --list
silent: true
run:
desc: 'Локальный запуск (нужен ./config.toml с db_path -> ./jellybit.db)'
cmds:
- go run {{.PKG}} --config ./config.toml
build:
desc: Статический бинарь linux/amd64 для сервера (Intel N150)
cmds:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags='-s -w' -o {{.BINARY}} {{.PKG}}
test:
desc: Прогон тестов
cmds:
- go test ./...
lint:
desc: Запуск golangci-lint
cmds:
- golangci-lint run
tidy:
desc: go mod tidy
cmds:
- go mod tidy
image:
desc: Docker-образ из готового бинаря (см. docs/adr docker-deploy)
deps: [build]
cmds:
- docker build -t jellybit:dev .
clean:
desc: Удалить собранный бинарь
cmds:
- rm -f {{.BINARY}}
setup:
desc: Установка инструментов разработки (линтер + git-хуки lefthook)
cmds:
- go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{{.GOLANGCI_VERSION}}
- lefthook install