/
Taskfile.yaml
47 lines (44 loc) · 1.07 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
version: '3'
vars:
BUILD_VERSION:
sh: echo ${BUILD_VERSION}
BUILD_COMMIT:
sh: git rev-parse HEAD
BUILD_DATE:
sh: date -u '+%Y-%m-%d %I:%M:%S %Z'
tasks:
pgrokd:
desc: Build the binary and start the pgrokd
deps: [build-pgrokd]
cmds:
- ./.bin/pgrokd
build:
deps: [build-pgrok, build-pgrokd]
build-pgrok:
desc: Build the binary of pgrok
cmds:
- go build -v -trimpath -o ./.bin/pgrok ./pgrok/cli
build-pgrokd:
desc: Build the binary of pgrokd
cmds:
- go build -v -trimpath -o ./.bin/pgrokd ./pgrokd/cli
sources:
- go.mod
- pgrokd/cli/*.go
- internal/**/*
method: timestamp
build-pgrokd-web:
desc: Build the web app of pgrokd
cmds:
- pnpm --dir pgrokd/web run build
build-pgrokd-release:
desc: Build the release binary of pgrokd
cmds:
- go build -v
-ldflags '
-X "main.version={{.BUILD_VERSION}}"
-X "main.commit={{.BUILD_COMMIT}}"
-X "main.date={{.BUILD_DATE}}"'
-trimpath
-o ./.bin/pgrokd
./pgrokd/cli