File tree Expand file tree Collapse file tree 4 files changed +29
-3
lines changed
Expand file tree Collapse file tree 4 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,11 @@ jobs:
111111
112112 - run : git fetch --force --tags
113113
114+ - name : Install UPX
115+ uses : crazy-max/ghaction-upx@v3
116+ with :
117+ install-only : true
118+
114119 - uses : actions/setup-go@v5
115120 with :
116121 go-version : ' >=1.20'
Original file line number Diff line number Diff line change 1+ # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
12# Documentation at https://goreleaser.com
3+ version : 2
4+
25before :
36 hooks :
47 - go mod tidy
@@ -13,7 +16,7 @@ builds:
1316 - windows
1417 - darwin
1518 ldflags :
16- - -X main.version={{.Version}}
19+ - -s -w - X main.version={{.Version}}
1720
1821archives :
1922 - name_template : >-
@@ -44,3 +47,22 @@ nfpms:
4447 - deb
4548 - rpm
4649 - apk
50+
51+ upx :
52+ - # Whether to enable it or not.
53+ #
54+ # Templates: allowed.
55+ enabled : true
56+
57+ # Filter by GOOS.
58+ goos : [ linux, windows ]
59+
60+ # Compress argument.
61+ # Valid options are from '1' (faster) to '9' (better), and 'best'.
62+ compress : ' 6'
63+
64+ # Whether to try LZMA (slower).
65+ lzma : false
66+
67+ # Whether to try all methods and filters (slow).
68+ brute : false
Original file line number Diff line number Diff line change 33cd " ${0%/* } /../"
44mkdir -p internal/file/embedded
55curl -fsSLo internal/file/embedded/supported_formats.json https://debricked.com/api/1.0/open/files/supported-formats
6- ls -l internal/file/embedded/
Original file line number Diff line number Diff line change 55 echo -e " Failed to find git, thus also the version. Version will be set to v0.0.0"
66fi
77version=$( git symbolic-ref -q --short HEAD || git describe --tags --exact-match)
8- ldFlags=" -X main.version=${version} "
8+ ldFlags=" -s -w - X main.version=${version} "
99go install -ldflags " ${ldFlags} " ./cmd/debricked
1010go generate -v -x ./cmd/debricked
1111go build -ldflags " ${ldFlags} " ./cmd/debricked
You can’t perform that action at this time.
0 commit comments