Upgrade Your Salesforce DX Pilot to Beta

Upgrade your pilot environment before using the Salesforce DX beta.
  1. If you want to continue using your Pilot source code in Beta and you haven't yet converted it to Metadata API format, do it now.
  2. Check your CLI binary version with the sfdx --version command. If you are using version 5.7.x, go to the next step. If you are using version 5.6.x, do the following
    1. Uninstall the 5.6 CLI.
    2. Install the beta 5.7 CLI.
  3. Ensure that you are using the beta version of the Salesforce DX plug-in (40.x).
    sfdx update
  4. Transition your pilot workspace to the new beta project format.
  5. Enable the Developer Hub (Dev Hub) in your production or business org so that you can create beta scratch orgs. You no longer use the Environment Hub to manage scratch orgs.

    You can also request a Trial org that has the Dev Hub enabled. Trial orgs expire after 30 days.

  6. Authorize the Dev Hub using the force:auth:web:login or force:auth:jwt:grant command.
  7. Recreate scratch orgs as needed. Your pilot scratch orgs were deleted.
  8. (Optional) Remove stale pilot scratch orgs from the output of force:org:list by removing their local authorization files. By default, the pilot files are named scratchorgXX@YY.json, but yours might differ if you created scratch orgs with custom usernames.
    rm <USER_HOME_DIR>/.sfdx/scratch*.json
  9. Start exploring Salesforce DX beta.

Convert Your Pilot Source Code to Metadata API Format

  1. Check your plug-in version with the sfdx plugins command. If you are on version 40.x, go back to version 39.x with these commands.
    sfdx plugins:uninstall salesforcedx
    sfdx plugins:install salesforcedx@v39.8.1-0
  2. Change to your pilot workspace directory.
     cd <pilot-work-dir>
  3. Convert your source code to Metadata API format, and store it in a temporary directory outside of the current one. You refer to this temporary directory later.
    sfdx force:source:convert -d <converted-pilot-source-dir>

Transition Your Pilot Workspace to the Beta Project Format

  1. Back up your pilot workspace.
    cp -r <pilot-work-dir> <pilot-work-dir-backup>
  2. Change to the pilot workspace directory.
    cd <pilot-work-dir>
  3. Upgrade your pilot workspace by running force:project:upgrade and answering the prompts. The command renames sfdx-workspace.json to sfdx-project.json. It then uses a pattern to search for JSON files to convert to beta format. Enter D for the default pattern, or enter your own pattern.
    sfdx force:project:upgrade
  4. Remove the pilot force-app directory. You recreate it in the next step.
    rm force-app
  5. Convert your pilot source that is in Metadata API format into the new Beta project.
    sfdx force:mdapi:convert -r <converted-pilot-source-dir>