Skip to content

Commit 16052c8

Browse files
committed
ci: add version flag
1 parent 5031512 commit 16052c8

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ builds:
1414
- amd64
1515
flags:
1616
- -trimpath
17-
ldflags: -s -w
17+
ldflags: -s -w -X main.Version={{.Tag}}
1818
- id: darwin_arm64
1919
binary: gxpc
2020
env:
@@ -27,7 +27,7 @@ builds:
2727
- arm64
2828
flags:
2929
- -trimpath
30-
ldflags: -s -w
30+
ldflags: -s -w -X main.Version={{.Tag}}
3131
checksum:
3232
name_template: 'checksums.txt'
3333
snapshot:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.20
44

55
require (
66
github.com/fatih/color v1.15.0
7-
github.com/frida/frida-go v0.6.6
7+
github.com/frida/frida-go v0.6.7
88
github.com/spf13/cobra v1.7.0
99
)
1010

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
22
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
33
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
4-
github.com/frida/frida-go v0.6.5 h1:B+UsjyAY1W0GUKfR1aLAiY1LdrcWnA83vWpY4iF+Ckw=
5-
github.com/frida/frida-go v0.6.5/go.mod h1:OyRIp58wuTcGggI6ztakXcHkTXrt5WfD9yi3pq6QyGw=
64
github.com/frida/frida-go v0.6.6 h1:bHTtgOhGuXspabo2t2vLp0s2I7DneC6twQ5xn4SOnls=
75
github.com/frida/frida-go v0.6.6/go.mod h1:OyRIp58wuTcGggI6ztakXcHkTXrt5WfD9yi3pq6QyGw=
6+
github.com/frida/frida-go v0.6.7 h1:zgwcDmXUqzK8mzalQfewe2rB/4Fhfv0glI/M7DX3c54=
7+
github.com/frida/frida-go v0.6.7/go.mod h1:OyRIp58wuTcGggI6ztakXcHkTXrt5WfD9yi3pq6QyGw=
88
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
99
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1010
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=

main.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,20 @@ import (
88
"os"
99
"os/signal"
1010
"regexp"
11-
"runtime/pprof"
1211
"strings"
1312
"syscall"
1413
)
1514

1615
//go:embed script.js
1716
var scContent string
1817

18+
var Version string
19+
1920
var rootCmd = &cobra.Command{
20-
Use: "gxpc [spawn_args]",
21-
Short: "XPC sniffer",
21+
Use: "gxpc [spawn_args]",
22+
Short: "XPC sniffer",
23+
Version: Version,
2224
Run: func(cmd *cobra.Command, args []string) {
23-
out, _ := os.Create("out.pprof")
24-
pprof.StartCPUProfile(out)
25-
defer pprof.StopCPUProfile()
26-
2725
logger := NewLogger()
2826

2927
list, err := cmd.Flags().GetBool("list")

0 commit comments

Comments
 (0)