Files
md-to-html/Makefile
T
Sergey Filkin 5bb488ccd0
release / release (push) Has been cancelled
build / test (push) Successful in 11m1s
build / cross-compile (amd64, linux) (push) Failing after 5m43s
build / cross-compile (arm64, darwin) (push) Failing after 5m23s
build / cross-compile (arm64, linux) (push) Failing after 5m23s
Release v0.2.2
2026-04-18 14:42:16 +03:00

46 lines
1.1 KiB
Makefile

VERSION := $(shell cat VERSION)
LDFLAGS := -X github.com/fserg/md-to-html/internal/version.Version=$(VERSION)
GOBIN := $(shell go env GOPATH)/bin
TEMPL := $(GOBIN)/templ
.PHONY: build run test templ tailwind dev docker clean tools release release-all
build:
go build -ldflags "$(LDFLAGS)" -o bin/md-to-html ./cmd/md-to-html
run:
go run ./cmd/md-to-html serve
test:
go test ./...
templ:
$(TEMPL) generate ./...
tailwind:
mkdir -p web/static/dist
npx tailwindcss -i web/static/src/app.css -o web/static/dist/app.css --minify
dev:
mkdir -p web/static/dist
sh -c 'npx tailwindcss -i web/static/src/app.css -o web/static/dist/app.css --watch & \
TAILWIND_PID=$$!; \
trap "kill $$TAILWIND_PID" EXIT INT TERM; \
$(TEMPL) generate --watch --proxy=http://localhost:8080 --cmd="go run ./cmd/md-to-html serve"'
docker:
@echo "docker target will be implemented in phase 6"
release:
./scripts/release-build.sh
release-all:
./scripts/release-build.sh --all
clean:
rm -rf bin/ tmp/ web/static/dist/
tools:
go install github.com/a-h/templ/cmd/templ@v0.3.1001
go install github.com/templui/templui/cmd/templui@latest