Skip to content

Commit

Permalink
Fix/download release (#16)
Browse files Browse the repository at this point in the history
Fix / synch  copy / download scripts with the babylon repo versions.
  • Loading branch information
maurolacy authored Jun 19, 2024
1 parent cac4ac9 commit 312f29e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,16 @@ set -o errexit -o nounset -o pipefail
command -v shellcheck >/dev/null && shellcheck "$0"

CONTRACTS="babylon_contract btc_staking"
OUTPUT_FOLDER="$(dirname "$0")"
OUTPUT_FOLDER="$(dirname "$0")/../testdata"

echo "DEV-only: copy from local built instead of downloading"

M=$(uname -m)
S=${M#x86_64}
S=${S/arm64/aarch64}
S=${S:+-$S}

for CONTRACT in $CONTRACTS
do
cp -f ../babylon-contract/artifacts/"${CONTRACT}${S}".wasm "$OUTPUT_FOLDER/${CONTRACT}.wasm"
cp -f ../../babylon-contract/artifacts/"${CONTRACT}".wasm "$OUTPUT_FOLDER/"
done

cd ../babylon-contract
cd ../../babylon-contract
TAG=$(git rev-parse HEAD)
cd - 2>/dev/null
echo "$TAG" >"$OUTPUT_FOLDER/version.txt"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ command -v shellcheck >/dev/null && shellcheck "$0"
OWNER="babylonchain"
REPO="babylon-contract"
CONTRACTS="babylon_contract btc_staking"
OUTPUT_FOLDER="$(dirname "$0")"
OUTPUT_FOLDER="$(dirname "$0")/../testdata"

[ -z "$GITHUB_API_TOKEN" ] && echo "Error: Please define GITHUB_API_TOKEN variable." >&2 && exit 1

Expand Down
Binary file modified tests/testdata/babylon_contract.wasm
Binary file not shown.
Binary file modified tests/testdata/btc_staking.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/testdata/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ed2bb75d109c579ad9b1e8ad1efe089421326028
v0.7.0-rc.0

0 comments on commit 312f29e

Please sign in to comment.