mirror of
https://github.com/apernet/hysteria.git
synced 2025-04-03 04:27:39 +03:00
chore(build): add taskfile
add taskfile Signed-off-by: kovacs <mritd@linux.com>
This commit is contained in:
parent
eb7de74355
commit
119f2a8bcb
1 changed files with 156 additions and 0 deletions
156
Taskfile.yaml
Normal file
156
Taskfile.yaml
Normal file
|
@ -0,0 +1,156 @@
|
|||
version: '3'
|
||||
|
||||
tasks:
|
||||
clean:
|
||||
cmds:
|
||||
- rm -rf dist
|
||||
- mkdir -p dist
|
||||
build-hysteria:
|
||||
label: build-{{.TASK}}
|
||||
vars:
|
||||
BUILD_COMMIT:
|
||||
sh: git rev-parse HEAD
|
||||
BUILD_DATE:
|
||||
sh: date "+%Y%m%d%H%M%S"
|
||||
dir: ./cmd
|
||||
cmds:
|
||||
- |
|
||||
GOOS={{.GOOS}} GOARCH={{.GOARCH}} GOARM={{.GOARM}} GOMIPS={{.GOMIPS}} \
|
||||
go build -trimpath -o ../dist/hysteria-{{.TASK}} -ldflags \
|
||||
"-w -s -X main.appCommit={{.BUILD_COMMIT}} -X main.appDate={{.BUILD_DATE}}"
|
||||
linux-386:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: 386
|
||||
}
|
||||
linux-amd64:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: amd64
|
||||
}
|
||||
linux-amd64-v3:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: amd64,
|
||||
GOAMD64: v3
|
||||
}
|
||||
linux-armv5:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: arm,
|
||||
GOARM: 5
|
||||
}
|
||||
linux-armv6:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: arm,
|
||||
GOARM: 6
|
||||
}
|
||||
linux-armv7:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: arm,
|
||||
GOARM: 7
|
||||
}
|
||||
linux-armv8:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: arm64
|
||||
}
|
||||
linux-mips-hardfloat:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: mips,
|
||||
GOMIPS: hardfloat
|
||||
}
|
||||
linux-mipsle-softfloat:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: mipsle,
|
||||
GOMIPS: softfloat
|
||||
}
|
||||
linux-mipsle-hardfloat:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: mipsle,
|
||||
GOMIPS: hardfloat
|
||||
}
|
||||
linux-mips64:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: mips64
|
||||
}
|
||||
linux-mips64le:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: linux,
|
||||
GOARCH: mips64le
|
||||
}
|
||||
darwin-amd64:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: darwin,
|
||||
GOARCH: amd64
|
||||
}
|
||||
darwin-arm64:
|
||||
cmds:
|
||||
- task: build-hysteria
|
||||
vars: {
|
||||
TASK: "{{.TASK}}",
|
||||
GOOS: darwin,
|
||||
GOARCH: arm64
|
||||
}
|
||||
default:
|
||||
cmds:
|
||||
- task: clean
|
||||
- task: linux-386
|
||||
- task: linux-amd64
|
||||
- task: linux-amd64-v3
|
||||
- task: linux-armv5
|
||||
- task: linux-armv6
|
||||
- task: linux-armv7
|
||||
- task: linux-armv8
|
||||
- task: linux-mips-hardfloat
|
||||
- task: linux-mipsle-softfloat
|
||||
- task: linux-mipsle-hardfloat
|
||||
- task: linux-mips64
|
||||
- task: linux-mips64le
|
||||
- task: darwin-amd64
|
||||
- task: darwin-arm64
|
Loading…
Add table
Add a link
Reference in a new issue