-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yaml
64 lines (54 loc) · 1.2 KB
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
# https://taskfile.dev
version: "3"
vars:
GO_OS: "windows" # Default OS
GO_ARCH: "amd64" # Default architecture
APP_NAME: "enex2paperless" # Application name
tasks:
release:
desc: Use goreleaser to create a release
dotenv:
- github_token.env
cmds:
- goreleaser release --clean
run:
desc: run main
cmds:
- go run cmd/main/main.go assets/test.enex
build:
internal: true
vars:
GO_OS: "{{ .GO_OS }}"
GO_ARCH: "{{ .GO_ARCH }}"
cmds:
- GOOS={{ .GO_OS }} GOARCH={{ .GO_ARCH }} go build -o build/{{ .APP_NAME }}_{{ .GO_OS }}_{{ .GO_ARCH }} cmd/main/main.go
build_windows:
desc: Build for Windows (amd64)
cmds:
- task: build
vars:
GO_OS: "windows"
build_linux:
desc: Build for Linux (amd64)
cmds:
- task: build
vars:
GO_OS: "linux"
build_darwin:
desc: Build for macOS (amd64)
cmds:
- task: build
vars:
GO_OS: "darwin"
build_all:
desc: Build for all OS
cmds:
- task: build_windows
- task: build_linux
- task: build_darwin
test:
desc: Run all tests with verbose output
dir: .
cmds:
- gotest -v ./...