Skip to content

Instantly share code, notes, and snippets.

@gbutt
Created July 10, 2020 20:37
Show Gist options
  • Save gbutt/e87fc218ab566ae482c4b61809b2b305 to your computer and use it in GitHub Desktop.
Save gbutt/e87fc218ab566ae482c4b61809b2b305 to your computer and use it in GitHub Desktop.
#!/bin/bash
CHANGESET_NAME=$1
if [[ "$CHANGESET_NAME" == "" ]]; then
echo No change set specified
exit 1
fi
DEST_ORG=$2
if [[ "$DEST_ORG" == "" ]]; then
DEST_ORG=`sfdx force:org:display | grep Alias | awk '{print $2}'`
fi
rm -rf "retrieved/$CHANGESET_NAME"
sfdx force:mdapi:retrieve -p "$CHANGESET_NAME" -r retrieved -u "$DEST_ORG"
pushd retrieved
unzip unpackaged.zip
rm unpackaged.zip
popd
#!/bin/bash
CHANGESET_NAME=$1
DEST_ORG=$2
if [[ "$CHANGESET_NAME" == "" ]]; then
echo No change set specified
exit 1
fi
if [[ "$DEST_ORG" == "" ]]; then
echo No destination specified
exit 1
fi
sfdx force:mdapi:deploy -d "retrieved/$CHANGESET_NAME" -u "$DEST_ORG" -w 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment