Skip to content

Commit

Permalink
Merge branch 'gda-docker-release' of https://github.com/superfluid-fi…
Browse files Browse the repository at this point in the history
…nance/superfluid-sentinel into gda-docker-release
  • Loading branch information
ngmachado committed Feb 21, 2024
2 parents ca8deb9 + 661a1eb commit 9b27d66
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/manageSnapshots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -xe

#Variables
filename="networks"
rpc_urls="${SNAPSHOT_RPC_URLS}"
ipfs_api="${IPFS_API}"

generate_snapshot() {
Expand All @@ -14,13 +14,17 @@ generate_snapshot() {
mkdir snapshots
fi

while IFS=, read -r _ rpc; do
echo "${rpc} - ${rpc:-no rpc found}"
[ -n "$rpc" ] && node ./scripts/buildSnapshot.js "$rpc"
done < "$filename"
# Get list of RPC URLs from environment variable
IFS=',' read -r -a rpc_array <<< "$rpc_urls"
for rpc in "${rpc_array[@]}"; do
echo "${rpc}"
[ -n "$rpc" ] && node ./scripts/buildSnapshot.js "https://$rpc"
done

echo "Generating done"
}


upload_snapshot() {
echo "Uploading snapshots..."
ipfs_logfile="logs/ipfs_$(date '+%Y-%m-%d').txt"
Expand Down

0 comments on commit 9b27d66

Please sign in to comment.