Skip to content

Commit 62341f1

Browse files
authored
build(flags): add -trimpath to binary builds (#264)
1 parent 3cc1064 commit 62341f1

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ jobs:
174174

175175
- name: Build main CLI
176176
run: |
177-
go build -v -ldflags="-s -w" -o dist/dtvem${{ matrix.goos == 'windows' && '.exe' || '' }} ./src
177+
go build -v -ldflags="-s -w" -trimpath -o dist/dtvem${{ matrix.goos == 'windows' && '.exe' || '' }} ./src
178178
shell: bash
179179
env:
180180
GOOS: ${{ matrix.goos }}
181181
GOARCH: ${{ matrix.goarch }}
182182

183183
- name: Build shim executable
184184
run: |
185-
go build -v -ldflags="-s -w" -o dist/dtvem-shim${{ matrix.goos == 'windows' && '.exe' || '' }} ./src/cmd/shim
185+
go build -v -ldflags="-s -w" -trimpath -o dist/dtvem-shim${{ matrix.goos == 'windows' && '.exe' || '' }} ./src/cmd/shim
186186
shell: bash
187187
env:
188188
GOOS: ${{ matrix.goos }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ jobs:
179179

180180
- name: Build main CLI
181181
run: |
182-
go build -v -ldflags="-s -w" -o dist/dtvem${{ matrix.goos == 'windows' && '.exe' || '' }} ./src
182+
go build -v -ldflags="-s -w" -trimpath -o dist/dtvem${{ matrix.goos == 'windows' && '.exe' || '' }} ./src
183183
shell: bash
184184
env:
185185
GOOS: ${{ matrix.goos }}
186186
GOARCH: ${{ matrix.goarch }}
187187

188188
- name: Build shim executable
189189
run: |
190-
go build -v -ldflags="-s -w" -o dist/dtvem-shim${{ matrix.goos == 'windows' && '.exe' || '' }} ./src/cmd/shim
190+
go build -v -ldflags="-s -w" -trimpath -o dist/dtvem-shim${{ matrix.goos == 'windows' && '.exe' || '' }} ./src/cmd/shim
191191
shell: bash
192192
env:
193193
GOOS: ${{ matrix.goos }}

rnr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ build:
2424

2525
build-cli:
2626
description: Build the main CLI executable
27-
cmd: go build -v -ldflags="-s -w" -o dist/dtvem.exe ./src
27+
cmd: go build -v -ldflags="-s -w" -trimpath -o dist/dtvem.exe ./src
2828

2929
build-shim:
3030
description: Build the shim executable
31-
cmd: go build -v -ldflags="-s -w" -o dist/dtvem-shim.exe ./src/cmd/shim
31+
cmd: go build -v -ldflags="-s -w" -trimpath -o dist/dtvem-shim.exe ./src/cmd/shim
3232

3333
# Deployment (Windows)
3434
deploy-local:

0 commit comments

Comments
 (0)