Unverified Commit 3f4b95b8 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #5718 from ipfs/fix/makesource

fix the maketarball script
parents 7e26ef58 f2d645f9
...@@ -5,18 +5,18 @@ ...@@ -5,18 +5,18 @@
set -euo pipefail set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
OUTPUT="$(readlink -f "${1:-go-ipfs-source.tar.gz}")"
OUTPUT="${1:-go-ipfs-source.tar.gz}"
TMPDIR="$(mktemp -d)" TMPDIR="$(mktemp -d)"
NEWIPFS="$TMPDIR/github.com/ipfs/go-ipfs" NEWIPFS="$TMPDIR/src/github.com/ipfs/go-ipfs"
mkdir -p "$NEWIPFS" mkdir -p "$NEWIPFS"
cp -r . "$NEWIPFS" cp -r . "$NEWIPFS"
( cd "$NEWIPFS" && ( cd "$NEWIPFS" &&
echo $PWD && echo $PWD &&
GOPATH="$TMPDIR" gx install --local && GOPATH="$TMPDIR" gx install --local &&
(git rev-parse --short HEAD || true) > .tarball && (git rev-parse --short HEAD || true) > .tarball &&
tar -czf "$OUTPUT" --exclude="./.git" . chmod -R u=rwX,go=rX "$NEWIPFS" # normalize permissions
tar -czf "$OUTPUT" --exclude="./.git" .
) )
rm -rf "$TMPDIR" rm -rf "$TMPDIR"
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