Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOB-300 Bump v4-client and abacus #15

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading