Skip to content

Commit 4bfc927

Browse files
committed
chore(build): make tar command configurable by env var
current `tar` command's with option `--owner=0` does not work on MacOS. make `tar` configurable by environment variable `TAR`.
1 parent 24d25b6 commit 4bfc927

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

build/build.inc.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ source ./build.inc.version.sh
66
getLdFlags() {
77
echo "-s -w -X $MOD/version.appVer=$VERSION -X $MOD/version.appArch=${ARCH:-$(go env GOARCH)}"
88
}
9+
TAR=${TAR:-tar}

build/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ for build in "$@"; do
3131
if [ "$GOOS" == "windows" ]; then
3232
zip -qrj "${OUTFILE}.zip" "$TMP/"
3333
else
34-
tar --owner=0 --group=0 -zcf "${OUTFILE}.tar.gz" -C "$TMP" $(ls -A1 "$TMP")
34+
$TAR --owner=0 --group=0 -zcf "${OUTFILE}.tar.gz" -C "$TMP" $(ls -A1 "$TMP")
3535
fi
3636
done

0 commit comments

Comments
 (0)