Skip to content

Commit

Permalink
Turn on Skip (#212)
Browse files Browse the repository at this point in the history
* use skip true

* bump abacus to 1.8.39

* Update AbacusStateManager.swift

* add placeholder for alchemyApiKey

* bump abacus to 1.8.43

* inject alchemy api key

* fix set schema script

* bump abacus

* read from v1 configs

---------

Co-authored-by: Mike <[email protected]>
  • Loading branch information
mike-dydx and mike-dydx committed Aug 21, 2024
1 parent f69bad3 commit 96e4059
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 83 deletions.
4 changes: 2 additions & 2 deletions dydx/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Abacus (1.8.35)
- Abacus (1.8.47)
- Amplitude-iOS (4.10.0)
- AppsFlyerFramework (6.14.5):
- AppsFlyerFramework/Main (= 6.14.5)
Expand Down Expand Up @@ -386,7 +386,7 @@ CHECKOUT OPTIONS:
:git: https://github.com/dydxprotocol/Charts.git

SPEC CHECKSUMS:
Abacus: c7d47d1f36fafe939a73aa9df50432bbabfaa006
Abacus: 142987c6ce153b9a6a997c07b08c0fb058b8584b
Amplitude-iOS: 7d8cdc3408ba35c2e68368fc7c692cd104606b94
AppsFlyerFramework: 6bd90198428b9646a5653f8e0f19de529788b70e
Atributika: ecedf5259e4aa3c6278d840b6c18d60c1a8b6ca0
Expand Down
6 changes: 3 additions & 3 deletions dydx/Pods/Local Podspecs/abacus.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dydx/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

132 changes: 66 additions & 66 deletions dydx/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ public final class AbacusStateManager: NSObject {
}

appConfigs.onboardingConfigs.squidVersion = OnboardingConfigs.SquidVersion.v2
appConfigs.onboardingConfigs.alchemyApiKey = CredientialConfig.shared.key(for: "alchemyApiKey")
StatsigConfig.shared.useSkip = true

return AsyncAbacusStateManagerV2(
deploymentUri: deploymentUri,
Expand Down
2 changes: 1 addition & 1 deletion podspecs/Abacus.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'Abacus'
spec.version = '1.8.35'
spec.version = '1.8.47'
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
spec.source = { :git => "[email protected]:dydxprotocol/v4-abacus.git", :tag => "v#{spec.version}" }
spec.authors = ''
Expand Down
4 changes: 4 additions & 0 deletions scripts/secrets_default/credentials.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@
"amplitudeStagingApiKey": {
"value": "",
"comment": "Amplitude api key on staging"
},
"alchemyApiKey": {
"value": "",
"comment": "Alchemy Api Key for RPC nodes"
}
}
49 changes: 40 additions & 9 deletions scripts/set_scheme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,87 @@ SCRIPT_DIR=$(dirname "$0")
REPO_DIR="$SCRIPT_DIR/.."
INFO_PLIST="$REPO_DIR/dydxV4/dydxV4/Info.plist"

echo "Script directory: $SCRIPT_DIR"
echo "Repository directory: $REPO_DIR"
echo "Info.plist path: $INFO_PLIST"

if [ ! -f "$INFO_PLIST" ]; then
echo "Info.plist file $INFO_PLIST does not exist"
exit 1
fi

if ! command -v jq &> /dev/null
then
if ! command -v jq &> /dev/null; then
echo "Installing jq"
brew install jq
fi

if ! command -v curl &> /dev/null
then
if ! command -v curl &> /dev/null; then
echo "Installing curl"
brew install curl
fi

SECRETS_DIR="$SCRIPT_DIR/secrets"
echo "Secrets directory: $SECRETS_DIR"
if [ ! -d "$SECRETS_DIR" ]; then
echo "Secrets directory $SECRETS_DIR does not exist"
exit 1
fi

CREDENTIALS_FILE="$SECRETS_DIR/credentials.json"
echo "Credentials file path: $CREDENTIALS_FILE"
if [ ! -f "$CREDENTIALS_FILE" ]; then
echo "Credentials file $CREDENTIALS_FILE does not exist"
exit 1
fi

# read the credentials.json and find the webAppUrl field
echo "Reading webAppUrl from credentials.json"
WEB_APP_URL=$(jq -r '.webAppUrl.value' "$CREDENTIALS_FILE")
echo "Web App URL before cleaning: $WEB_APP_URL"
if [ -z "$WEB_APP_URL" ]; then
echo "Could not find webAppUrl in $CREDENTIALS_FILE"
exit 1
fi

# Remove trailing slash from WEB_APP_URL if it exists
WEB_APP_URL=${WEB_APP_URL%/}
echo "Web App URL after cleaning: $WEB_APP_URL"

echo "Fetching env.json from $WEB_APP_URL"
ENV_JSON=$(curl -X GET "$WEB_APP_URL/configs/v1/env.json")
if [ $? -ne 0 ]; then
echo "Failed to fetch env.json from $WEB_APP_URL"
exit 1
fi

ENV_JSON=$(curl -X GET $WEB_APP_URL/configs/env.json)
if [ -z "$ENV_JSON" ]; then
echo "Could not fetch env.json from $WEB_APP_URL"
echo "env.json is empty"
exit 1
fi

# Validate JSON format
echo "$ENV_JSON" | jq . > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Fetched env.json is not valid JSON:"
echo "$ENV_JSON"
exit 1
fi

SCHEME=$(echo $ENV_JSON | jq -r '.apps.ios.scheme')
echo "Fetched env.json:"
echo "$ENV_JSON"

echo "Extracting scheme from env.json"
SCHEME=$(echo "$ENV_JSON" | jq -r '.apps.ios.scheme')
echo "Scheme: $SCHEME"
if [ -z "$SCHEME" ]; then
echo "Could not find scheme in env.json"
exit 1
fi

# update the Info.plist file
echo "Updating $INFO_PLIST with scheme $SCHEME"
/usr/libexec/PlistBuddy -c "Set :CFBundleURLTypes:0:CFBundleURLSchemes:0 $SCHEME" "$INFO_PLIST"
if [ $? -eq 0 ]; then
echo "Successfully updated $INFO_PLIST with scheme $SCHEME"
else
echo "Failed to update $INFO_PLIST"
exit 1
fi

0 comments on commit 96e4059

Please sign in to comment.