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 ...@@ -12,15 +12,13 @@ if ! [[ "$OUTPUT" = /* ]]; then
fi fi
TMPDIR="$(mktemp -d)" TMPDIR="$(mktemp -d)"
NEWIPFS="$TMPDIR/src/github.com/ipfs/go-ipfs" cp -r . "$TMPDIR"
mkdir -p "$NEWIPFS" ( cd "$TMPDIR" &&
cp -r . "$NEWIPFS"
( cd "$NEWIPFS" &&
echo $PWD && echo $PWD &&
GOPATH="$TMPDIR" gx install --local && go mod vendor &&
(git rev-parse --short HEAD || true) > .tarball && (git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || true) > .tarball &&
chmod -R u=rwX,go=rX "$NEWIPFS" # normalize permissions chmod -R u=rwX,go=rX "$TMPDIR" # normalize permissions
tar -czf "$OUTPUT" --exclude="./.git" . tar -czf "$OUTPUT" --exclude="./.git" .
) )
rm -rf "$TMPDIR" rm -rf "$TMPDIR"
...@@ -10,6 +10,10 @@ unexport GOFLAGS ...@@ -10,6 +10,10 @@ unexport GOFLAGS
GOFLAGS ?= GOFLAGS ?=
GOTFLAGS ?= GOTFLAGS ?=
ifeq ($(tarball-is),1)
GOFLAGS += -mod=vendor
endif
# match Go's default GOPATH behaviour # match Go's default GOPATH behaviour
export GOPATH ?= $(shell $(GOCC) env GOPATH) 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