2020-02-12 21:28:37 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
ARCHS=(
|
|
|
|
"darwin"
|
|
|
|
"linux"
|
|
|
|
)
|
|
|
|
|
|
|
|
REQUIRED=(
|
|
|
|
"ipfs"
|
|
|
|
"sha512sum"
|
|
|
|
)
|
|
|
|
for REQUIRE in "${REQUIRED[@]}"
|
|
|
|
do
|
|
|
|
command -v "${REQUIRE}" >/dev/null 2>&1 || echo >&2 "'${REQUIRE}' must be installed"
|
|
|
|
done
|
|
|
|
|
|
|
|
mkdir bundle
|
|
|
|
pushd bundle
|
|
|
|
|
|
|
|
BINARIES=(
|
|
|
|
"lotus"
|
2020-07-08 10:38:59 +00:00
|
|
|
"lotus-miner"
|
2020-07-09 03:04:45 +00:00
|
|
|
"lotus-worker"
|
2020-02-12 21:28:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
export IPFS_PATH=`mktemp -d`
|
|
|
|
ipfs init
|
|
|
|
ipfs daemon &
|
|
|
|
PID="$!"
|
|
|
|
trap "kill -9 ${PID}" EXIT
|
|
|
|
sleep 30
|
|
|
|
|
|
|
|
for ARCH in "${ARCHS[@]}"
|
|
|
|
do
|
|
|
|
mkdir -p "${ARCH}/lotus"
|
|
|
|
pushd "${ARCH}"
|
|
|
|
for BINARY in "${BINARIES[@]}"
|
|
|
|
do
|
|
|
|
cp "../../${ARCH}/${BINARY}" "lotus/"
|
|
|
|
chmod +x "lotus/${BINARY}"
|
|
|
|
done
|
|
|
|
|
|
|
|
tar -zcvf "../lotus_${CIRCLE_TAG}_${ARCH}-amd64.tar.gz" lotus
|
|
|
|
popd
|
|
|
|
rm -rf "${ARCH}"
|
|
|
|
|
2020-08-06 16:01:30 +00:00
|
|
|
sha512sum "lotus_${CIRCLE_TAG}_${ARCH}-amd64.tar.gz" > "lotus_${CIRCLE_TAG}_${ARCH}-amd64.tar.gz.sha512"
|
2020-02-12 21:28:37 +00:00
|
|
|
|
2020-08-06 16:01:30 +00:00
|
|
|
ipfs add -q "lotus_${CIRCLE_TAG}_${ARCH}-amd64.tar.gz" > "lotus_${CIRCLE_TAG}_${ARCH}-amd64.tar.gz.cid"
|
2020-02-12 21:28:37 +00:00
|
|
|
done
|
2021-06-15 18:58:59 +00:00
|
|
|
cp "../appimage/Lotus-${CIRCLE_TAG}-x86_64.AppImage" .
|
|
|
|
sha512sum "Lotus-${CIRCLE_TAG}-x86_64.AppImage" > "Lotus-${CIRCLE_TAG}-x86_64.AppImage.sha512"
|
|
|
|
ipfs add -q "Lotus-${CIRCLE_TAG}-x86_64.AppImage" > "Lotus-${CIRCLE_TAG}-x86_64.AppImage.cid"
|
2020-02-12 21:28:37 +00:00
|
|
|
popd
|