release: Build with -trimpath

-trimpath prevents paths from the builder showing up in the
binary on panics and whatnot.
This commit is contained in:
Anmol Sethi 2022-12-06 06:36:41 -08:00
parent 1b1a024aad
commit 5f06afc72e
No known key found for this signature in database
GPG key ID: 25BC68888A99A8BA

View file

@ -13,7 +13,7 @@ sh_c find "$HW_BUILD_DIR" -exec touch {} \\\;
ensure_goos
ensure_goarch
sh_c mkdir -p "$HW_BUILD_DIR/bin"
sh_c CGO_ENABLED=0 go build \
sh_c CGO_ENABLED=0 go build -trimpath \
-ldflags "'-X oss.terrastruct.com/d2/lib/version.Version=$VERSION'" \
-o "$HW_BUILD_DIR/bin/d2" .