-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update zkey wasm used for contracts tests
- Loading branch information
Showing
4 changed files
with
18,987 additions
and
17,476 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
# Define environment variables | ||
BUCKET_NAME="proofofpassport-us" | ||
CIRCUIT_NAME="contracts_zkey_wasm.zip" | ||
DESTINATION_DIR="build/fromAWS/contracts" | ||
|
||
# Create the destination directory if it doesn't exist | ||
echo "Creating destination directory..." | ||
mkdir -p ${DESTINATION_DIR} | ||
|
||
# Download the file | ||
echo "Downloading ${CIRCUIT_NAME} from S3..." | ||
aws s3 cp s3://${BUCKET_NAME}/${CIRCUIT_NAME} ${DESTINATION_DIR}/${CIRCUIT_NAME} --no-sign-request | ||
|
||
if [ $? -eq 0 ]; then | ||
echo "Successfully downloaded ${CIRCUIT_NAME}" | ||
|
||
echo "Unzipping files..." | ||
# Use -j flag to junk (ignore) directory paths when extracting | ||
unzip -q -j -o ${DESTINATION_DIR}/${CIRCUIT_NAME} -d ${DESTINATION_DIR} | ||
|
||
if [ $? -eq 0 ]; then | ||
echo "Successfully unzipped files" | ||
|
||
echo "Cleaning up zip file..." | ||
rm ${DESTINATION_DIR}/${CIRCUIT_NAME} | ||
|
||
echo "Process completed successfully" | ||
else | ||
echo "Failed to unzip ${CIRCUIT_NAME}" | ||
exit 1 | ||
fi | ||
else | ||
echo "Failed to download ${CIRCUIT_NAME} from S3" | ||
exit 1 | ||
fi |
Oops, something went wrong.