Skip to content

Commit

Permalink
MOB-300 Bump v4-client and abacus (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang authored Mar 6, 2024
1 parent 788739b commit 8f2c793
Show file tree
Hide file tree
Showing 4 changed files with 63,566 additions and 59,005 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.gradle
/local.properties
/.idea/caches
/.idea/copilot
/.idea/libraries
/.idea/dictionaries
/.idea/misc.xml
Expand Down
46 changes: 46 additions & 0 deletions scripts/update_client_api.sh
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
2 changes: 1 addition & 1 deletion v4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ext {
compileSdkVersion = 34

// App dependencies
abacusVersion = '1.4.13'
abacusVersion = '1.4.14'
carteraVersion = '0.1.12'
kollectionsVersion = '2.0.16'

Expand Down
Loading

0 comments on commit 8f2c793

Please sign in to comment.