-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix snap publishing flow, publish assets independently
- Loading branch information
1 parent
156fb17
commit 8a41a6b
Showing
5 changed files
with
172 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
ARCH=$1 | ||
|
||
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" | ||
"lotus-miner" | ||
"lotus-worker" | ||
) | ||
|
||
export IPFS_PATH=`mktemp -d` | ||
ipfs init | ||
ipfs daemon & | ||
PID="$!" | ||
trap "kill -9 ${PID}" EXIT | ||
sleep 30 | ||
|
||
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}" | ||
|
||
sha512sum "lotus_${CIRCLE_TAG}_${ARCH}-amd64.tar.gz" > "lotus_${CIRCLE_TAG}_${ARCH}-amd64.tar.gz.sha512" | ||
|
||
ipfs add -q "lotus_${CIRCLE_TAG}_${ARCH}-amd64.tar.gz" > "lotus_${CIRCLE_TAG}_${ARCH}-amd64.tar.gz.cid" | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters