Forge 230724 Testing Guide for Partners
Product Information
Specifications
- Product Name: Forge CLI
- Version: Latest
Product Usage Instructions
Prerequisites
Before proceeding with testing, make sure you have the latest version of the Forge CLI. If not, follow these steps:
- Uninstall the current Forge CLI version using: npm uninstall -g @forge/cli
- Install the latest version using: npm i -g @forge/cli@latest
Run Tests
- Create a custom development environment: forge environments create -e my-custom-env
- Deploy your code to the custom environment: forge deploy -e my-custom-env
- Install the code on a site in the environment: forge install -e my-custom-env
Deploy to Production
- Determine the major version number to update
- Deploy the update to production with the major version specified: forge deploy -e production –major-version X
- Confirm the deployment by entering ‘y’
Debugging Errors
If the deployment fails or you encounter errors:
- Rerun the deployment in verbose mode to see detailed errors
- If deploying a change that requires a new major version, ensure the major version value is valid
- To view valid major versions, run: forge install list
FAQs
- Q: How can I check the latest version available?
- A: To check the latest version available, run: npm show @forge/cli version
- Q: Can I deploy changes without specifying a major version?
- A: Yes, you can deploy changes without specifying a major version for minor updates in a custom environment.
Prerequisites
Upgrade to the latest version of the Forge CLI. To do this, , completely remove the Forge CLI and install it again.
- npm uninstall -g @forge/cli
- npm i -g @forge/cli@latest
This test also assumes that you’ve prepared the exact version of the code matching the major version you’re targeting.
Run tests
- We recommend that you test your minor version updates in a custom development environment. To do this, run:
- forge environments create -e my-custom-env
- Deploy your target major version’s code to your custom development environment:
- forge deploy -e my-custom-env
- Upon deploying your code to the environment, install it on one of your sites:
- forge install -e my-custom-env
You can now test new app changes and re-deploy them to the same custom development environment. Each new deployment will create a new version of your app specific to that environment; as such, we don’t recommend that you use the –major-version option in your custom environment.
Be mindful of any changes that result in a major version change. Remember, you can only apply minor version upgrades to previous major versions. See Major upgrades for related information
Deploy to production
You can use the –major-version option to apply minor upgrades to any major version (even older ones). When you do, Forge will automatically apply the upgrade to all sites running that major version.
- Verify the major version number you need to update by listing all existing
- Upon verifying that your update works, deploy it to your target major version:
- forge deploy -e production –major-version X
- You’ll see a warning pop-up like this:
Once you’re ready, enter y . Forge will then deploy the code change to all sites with the specified major version installed.
Debugging Errors
Deployment failed
You will need to rerun to see your deployment in –verbose mode to see the exact error. If you are trying to deploy a change that would result in a new major version, the deployment will return an error similar to the following:
- Upsert Environment Request body is invalid.
- Error message: Cannot patch app as this change requires a
- major version update.
- Input major version is invalid or Invalid major version number The –major-version value you used is invalid. It should be greater than 1 and less than the latest version that exists for this app environment.
To view all valid major versions, run:- forge install list
This will display the major version installed on every site in production. It’ll also show which major version number is the latest:
Documents / Resources
![]() |
Forge 230724 Testing Guide for Partners [pdf] User Guide 230724, 051523, 230724 Testing Guide for Partners, 230724, Testing Guide for Partners, Guide for Partners, Partners |