forked from SpaiR/StrongDMM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
62 lines (54 loc) · 1.87 KB
/
Taskfile.yml
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
version: 3
includes:
task_win:
taskfile: ./Taskfile_windows.yml
optional: true
vars:
GIT_VERSION:
sh: git describe --tags --always
GIT_REV:
sh: git rev-parse --short HEAD
APP_NAME: StrongDMM
BIN_DST: ../dst/{{.APP_NAME}}{{exeExt}}
BUILD_VARS: -X sdmm/env.Version={{.GIT_VERSION}} -X sdmm/env.Revision={{.GIT_REV}}
LD_FLAGS_WINDOWS:
sh: echo '{{if eq OS "windows"}}-H windowsgui -extldflags=-static{{end}}'
LD_FLAGS: -s -w {{.BUILD_VARS}} {{.LD_FLAGS_WINDOWS}}
BUILD_ARGS: -trimpath -ldflags="{{.LD_FLAGS}}"
tasks:
run:
deps:
- build-sdmmparser
dir: src
cmds:
- go run {{.BUILD_ARGS}} .
build:
deps:
- build-sdmmparser
dir: src
cmds:
- go build {{.BUILD_ARGS}} -o "{{.BIN_DST}}" .
build-sdmmparser:
dir: src/third_party/sdmmparser/src
cmds:
- cargo build --release
release-files-unzip:
dir: dst
cmds:
- mkdir -p bin archive
- cp Windows/StrongDMM.exe bin/strongdmm-{{.GIT_VERSION}}-x86_64-pc-windows-gnu.exe
- cp Linux/StrongDMM bin/strongdmm-{{.GIT_VERSION}}-x86_64-unknown-linux-gnu
- cp macOS/StrongDMM bin/strongdmm-{{.GIT_VERSION}}-x86_64-apple-darwin
- zip -rj archive/strongdmm-windows.zip Windows
- zip -rj archive/strongdmm-linux.zip Linux
- zip -rj archive/strongdmm-macos.zip macOS
release-files-hash:
dir: dst/bin
cmds:
- sha256sum ./strongdmm-{{.GIT_VERSION}}-x86_64-pc-windows-gnu.exe | tee -a "strongdmm-{{.GIT_VERSION}}-x86_64-pc-windows-gnu.exe.sha256"
- sha256sum ./strongdmm-{{.GIT_VERSION}}-x86_64-unknown-linux-gnu | tee -a "strongdmm-{{.GIT_VERSION}}-x86_64-unknown-linux-gnu.sha256"
- sha256sum ./strongdmm-{{.GIT_VERSION}}-x86_64-apple-darwin | tee -a "strongdmm-{{.GIT_VERSION}}-x86_64-apple-darwin.sha256"
release-files:
cmds:
- task: release-files-unzip
- task: release-files-hash