Commit a6053d63 authored by Jakub Sztandera's avatar Jakub Sztandera

mk: fix maketarball to work with gomod

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>
parent 245c40b8
......@@ -12,15 +12,13 @@ if ! [[ "$OUTPUT" = /* ]]; then
fi
TMPDIR="$(mktemp -d)"
NEWIPFS="$TMPDIR/src/github.com/ipfs/go-ipfs"
mkdir -p "$NEWIPFS"
cp -r . "$NEWIPFS"
( cd "$NEWIPFS" &&
cp -r . "$TMPDIR"
( cd "$TMPDIR" &&
echo $PWD &&
GOPATH="$TMPDIR" gx install --local &&
(git rev-parse --short HEAD || true) > .tarball &&
chmod -R u=rwX,go=rX "$NEWIPFS" # normalize permissions
go mod vendor &&
(git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || true) > .tarball &&
chmod -R u=rwX,go=rX "$TMPDIR" # normalize permissions
tar -czf "$OUTPUT" --exclude="./.git" .
)
)
rm -rf "$TMPDIR"
......@@ -10,6 +10,10 @@ unexport GOFLAGS
GOFLAGS ?=
GOTFLAGS ?=
ifeq ($(tarball-is),1)
GOFLAGS += -mod=vendor
endif
# match Go's default GOPATH behaviour
export GOPATH ?= $(shell $(GOCC) env GOPATH)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment