File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,26 +10,32 @@ jobs:
1010 steps :
1111 - name : Checkout
1212 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
13- - uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # 5.5.0
13+ - name : Set up Go
14+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # 5.5.0
1415 with :
1516 go-version : ' >=1.21.0'
16- - run : go version
17+ - name : Display Go version
18+ run : go version
19+ - name : Get the version tag
20+ id : get-tag
21+ if : startsWith(github.ref, 'refs/tags/')
22+ run : echo "tag=${GITHUB_REF##*/}" >> $env:GITHUB_OUTPUT
1723 - name : Windows Build
1824 run : |
1925 $Env:GOOS='windows'
20- go build -o GoReSym.exe
26+ go build -ldflags="-X main.Version=${{ steps.get-tag.outputs.tag }}" - o GoReSym.exe
2127 Compress-Archive -DestinationPath GoReSym-windows.zip -LiteralPath ./GoReSym.exe -CompressionLevel Fastest
2228 Remove-Item ./GoReSym.exe
2329 - name : Linux Build
2430 run : |
2531 $Env:GOOS='linux'
26- go build -o GoReSym
32+ go build -ldflags="-X main.Version=${{ steps.get-tag.outputs.tag }}" - o GoReSym
2733 Compress-Archive -DestinationPath GoReSym-linux.zip -LiteralPath ./GoReSym -CompressionLevel Fastest
2834 Remove-Item ./GoReSym
2935 - name : Mac Build
3036 run : |
3137 $Env:GOOS='darwin'
32- go build -o GoReSym
38+ go build -ldflags="-X main.Version=${{ steps.get-tag.outputs.tag }}" - o GoReSym
3339 Compress-Archive -DestinationPath GoReSym-mac.zip -LiteralPath ./GoReSym -CompressionLevel Fastest
3440 Remove-Item ./GoReSym
3541 - name : Release Windows
4551 - name : Release Mac
4652 uses : softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # 2.3.2
4753 if : startsWith(github.ref, 'refs/tags/')
48- with :
49- files : GoReSym-mac.zip
50-
54+ with :
55+ files : GoReSym-mac.zip
Original file line number Diff line number Diff line change @@ -414,6 +414,8 @@ func TextToJson(key string, text string) string {
414414 return fmt .Sprintf ("{\" %s\" : \" %s\" }" , key , text )
415415}
416416
417+ var Version = "dev-local-build"
418+
417419func main () {
418420 stdout := bufio .NewWriter (os .Stdout )
419421 defer stdout .Flush ()
@@ -432,6 +434,7 @@ func main() {
432434 flag .Parse ()
433435
434436 if * about {
437+ fmt .Printf ("Version: %s" , Version )
435438 fmt .Println ("GoReSym is a Golang symbol recovery tool by Google's Mandiant FLARE team. Maintained by Stephen Eckels." )
436439 fmt .Println ("LICENSE MIT: https://github.com/mandiant/GoReSym/blob/master/LICENSE" )
437440 fmt .Println ("Dependencies:" )
You can’t perform that action at this time.
0 commit comments