forked from mozillazg/ptcpdump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
64 lines (58 loc) · 1.69 KB
/
.goreleaser.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
63
64
before:
hooks:
- sudo apt-get install -y gcc flex bison make libelf-dev gcc-aarch64-linux-gnu libc6-dev-arm64-cross
- git submodule update --init --recursive
builds:
- id: ptcpdump-arm64
binary: ptcpdump
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
flags:
- -tags=static
ldflags:
- -linkmode 'external'
- -extldflags "-static"
- -X github.com/mozillazg/ptcpdump/internal.Version={{.Version}}
- -X github.com/mozillazg/ptcpdump/internal.GitCommit={{.Commit}}
goos:
- linux
goarch:
- arm64
hooks:
pre:
- bash -c 'sudo make clean || true'
- bash -c 'cd lib/libpcap && sudo make uninstall prefix=/usr/local || true'
- sudo make libpcap LIBPCAP_DIST_DIR=/usr/local CARCH=aarch64 CC=aarch64-linux-gnu-gcc
- sudo make libpcap LIBPCAP_DIST_DIR=/usr/aarch64-linux-gnu CARCH=aarch64 CC=aarch64-linux-gnu-gcc
- id: ptcpdump-amd64
binary: ptcpdump
env:
- CGO_ENABLED=1
- CC=gcc
flags:
- -tags=static
ldflags:
- -linkmode 'external'
- -extldflags "-static"
- -X github.com/mozillazg/ptcpdump/internal.Version={{.Version}}
- -X github.com/mozillazg/ptcpdump/internal.GitCommit={{.Commit}}
goos:
- linux
goarch:
- amd64
hooks:
pre:
- bash -c 'sudo make clean || true'
- bash -c 'cd lib/libpcap && sudo make uninstall prefix=/usr/local || true'
- sudo make libpcap LIBPCAP_DIST_DIR=/usr/local CARCH=x86_64
archives:
- builds:
- ptcpdump-arm64
- ptcpdump-amd64
checksum:
name_template: 'checksums.txt'
release:
prerelease: auto
snapshot:
name_template: "{{ .Tag }}-next"