Add Taskfile
Adds a Taskfile for easier building. This should replace the Makefile one day.
This commit is contained in:
parent
cec58caffe
commit
e8fc0f14d5
|
@ -34,9 +34,10 @@ In it's current implementation, `weblug` requires to remain running as root with
|
|||
|
||||
## Build
|
||||
|
||||
make # Build weblug
|
||||
make static # Make a static binary
|
||||
I'm using a [taskfile](https://taskfile.dev/) for build recipes. The `Makefile` is still kept for OBS and backwards compatability.
|
||||
|
||||
task build # Build weblug
|
||||
task build-static # Build a static binary
|
||||
## Run as systemd unit
|
||||
|
||||
This repository provides an example [weblug.service](weblug.service), which can be used to start `weblug` as systemd service.
|
||||
|
|
17
Taskfile.yml
Normal file
17
Taskfile.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
# See https://taskfile.dev/
|
||||
|
||||
version: '3'
|
||||
|
||||
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- go build -o weblug cmd/weblug/*.go
|
||||
build-static:
|
||||
cmds:
|
||||
- CGO_ENABLED=0 go build -ldflags="-w -s" -o weblug cmd/weblug/*.go
|
||||
test:
|
||||
cmds:
|
||||
- go test ./...
|
||||
- sudo bash -c "cd test && ./blackbox.sh"
|
Loading…
Reference in a new issue