Skip to content

Commit

Permalink
Update devhub.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jlantz authored Sep 11, 2023
1 parent 970407e commit 29ed327
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions devhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ else
[[ -f /tmp/packaging_org_auth_url ]] && rm /tmp/packaging_org_auth_url
fi

if [ -z "$TARGET_ORG_AUTH_URL" ]; then
echo "No TARGET_ORG_AUTH_URL set, skipping target org authentication."
else
# Authenticate using Auth URL
echo "Authenticating to Target Org using auth url..."

# Write the TARGET_ORG_AUTH_URL to a file
echo $TARGET_ORG_AUTH_URL > /tmp/target_org_auth_url

# Authenticate the DevHub
sfdx org login sfdx-url -f /tmp/target_org_auth_url -a target

# Import the org to CumulusCI
cci org import target target

[[ -f /tmp/target_org_auth_url ]] && rm /tmp/target_org_auth_url
fi

if [ "`whoami`" == "d2x" ]; then
echo "Setting dev as the default org"
cci org default dev
Expand Down

0 comments on commit 29ed327

Please sign in to comment.