-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOB-300 Bump v4-client and abacus (#15)
- Loading branch information
Showing
4 changed files
with
63,566 additions
and
59,005 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# Check if the current directory is named 'scripts' | ||
ORIG_DIR="$PWD" | ||
CURRENT_DIR=$(basename "$PWD") | ||
if [ "$CURRENT_DIR" != "scripts" ]; then | ||
echo "This script must be run from the directory named 'scripts' in v4-native-ios/scripts" | ||
exit 1 | ||
fi | ||
|
||
# Defining a temporary directory for cloning | ||
TMP_DIR=$(mktemp -d) | ||
|
||
# Function to clean up the temporary directory | ||
cleanup() { | ||
echo "Cleaning up..." | ||
rm -rf "$TMP_DIR" | ||
} | ||
|
||
# Trap to clean up in case of script exit or interruption | ||
trap cleanup EXIT | ||
|
||
# Cloning into the temporary directory and navigating there | ||
git clone [email protected]:dydxprotocol/v4-clients.git "$TMP_DIR/v4-clients" | ||
cd "$TMP_DIR/v4-clients/v4-client-js" | ||
|
||
# If cloning fails, exit the script | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to clone the v4-clients repository. Please check your network connection and repository access." | ||
exit 1 | ||
fi | ||
|
||
# Running npm commands | ||
npm install | ||
npm run build | ||
npm run webpack | ||
|
||
# Check if the target directory for copying exists | ||
TARGET_DIR="$ORIG_DIR/../v4/integration/cosmos/src/main/assets" | ||
echo "$TARGET_DIR" | ||
if [ -d "$TARGET_DIR" ]; then | ||
# Copying the file to the specified location | ||
cp __native__/__ios__/v4-native-client.js "$TARGET_DIR/v4-native-client.js" | ||
else | ||
echo "Target directory $TARGET_DIR does not exist. File not copied." | ||
fi |
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
Oops, something went wrong.