Skip to content

Commit f1a8aaf

Browse files
committed
build: exclude .git from go_sdk archives
The ~400mb .git directory isn't a *build* dep and makes the artifact about 2x bigger. Release note: none. Epic: none.
1 parent 9968c43 commit f1a8aaf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build/teamcity/internal/release/build-and-publish-patched-go/impl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ for CONFIG in $CONFIGS; do
117117
mv go/bin/${GOOS}_$GOARCH/* go/bin
118118
rm -r go/bin/${GOOS}_$GOARCH
119119
fi
120-
tar cf - go | gzip -9 > /artifacts/go$GOVERS.$GOOS-$GOARCH.tar.gz
120+
tar --exclude='.git' -cf - go | gzip -9 > /artifacts/go$GOVERS.$GOOS-$GOARCH.tar.gz
121121
rm -rf go/bin
122122
done
123123

build/teamcity/internal/release/sign-patched-go.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ sign() {
4141
--code-signature-flags runtime \
4242
"darwin-$1/go/bin/$bin"
4343
done
44-
tar cf - -C "darwin-$1" go | gzip -9 > "artifacts/$archive"
44+
tar --exclude='.git' -cf - -C "darwin-$1" go | gzip -9 > "artifacts/$archive"
4545
mkdir staging
4646
cp "darwin-$1/go/bin/gofmt" staging
4747
cp "darwin-$1/go/bin/go" staging

0 commit comments

Comments
 (0)