mirror of
https://github.com/skidoodle/pastebin
synced 2026-04-27 18:57:40 +02:00
22 lines
614 B
Makefile
22 lines
614 B
Makefile
binary := if os() == "windows" { "pastebin.exe" } else { "pastebin" }
|
|
|
|
set windows-shell := ["powershell.exe", "-NoProfile", "-Command"]
|
|
|
|
default:
|
|
@just --list
|
|
|
|
build:
|
|
go build -o {{ binary }} .
|
|
|
|
test:
|
|
go test -v -coverprofile coverage.out ./...
|
|
|
|
cover: test
|
|
go tool cover -html coverage.out
|
|
|
|
clean:
|
|
{{ if os() == "windows" { "@if (Test-Path " + binary + ") { Remove-Item " + binary + " }; if (Test-Path coverage.out) { Remove-Item coverage.out }" } else { "rm -f " + binary + " coverage.out" } }}
|
|
|
|
run *args: build
|
|
{{ if os() == "windows" { ".\\" } else { "./" } }}{{ binary }} {{ args }}
|