Skip to content

Commit 8f1d331

Browse files
committed
use trimpath
1 parent cae329a commit 8f1d331

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373

7474
- name: run meli
7575
run: |
76-
go build --race -o meli cli/cli.go
76+
go build -trimpath --race -o meli cli/cli.go
7777
./meli -v
7878
./meli -up -d -f testdata/docker-compose.yml
7979
num_containers=$(docker ps -q | wc -l)
@@ -218,7 +218,7 @@ jobs:
218218
219219
- name: time meli -up
220220
run: |
221-
go build -o meli cli/cli.go
221+
go build -trimpath -o meli cli/cli.go
222222
docker ps -aq | xargs docker rm -f && docker image prune -fa && docker system prune -af
223223
time ./meli -up -d -f testdata/docker-compose.yml
224224

.goreleaser.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ build:
22
main: cli/cli.go
33
binary: meli
44
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
5+
flags:
6+
- -trimpath
7+
- -v
8+
asmflags:
9+
- all=-trimpath={{.Env.GOPATH}}
10+
gcflags:
11+
- all=-trimpath={{.Env.GOPATH}}
512
env:
613
- CGO_ENABLED=0
714
goos:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ However, I'm not making a tool to take docker-compose to the races.
134134
# Development
135135
#### Build
136136
`git clone [email protected]:komuw/meli.git`
137-
`go build -o meli cli/cli.go`
137+
`go build -trimpath -o meli cli/cli.go`
138138
`./meli -up -f /path/to/docker-compose-file.yml`
139139

140140
####
141141
#### 1
142-
`go build -o meli cli/cli.go`
142+
`go build -trimpath -o meli cli/cli.go`
143143
`dlv exec ./meli -- -up -f testdata/docker-compose.yml`
144144
`(dlv) help`
145145
`(dlv) break cli/cli.go:246`

0 commit comments

Comments
 (0)