A homebrew package to manage the repeated creation of scratch orgs for day to day work.
brew tap mvogelgesang/quick-org-creator
brew install quick-org-creator
The first time oc
is run, it will establish a configuration file that is used to supply the list of DevHub orgs, any namespaces, and set default values.
oc
Creates a new scratch org and prompts user to identify which DevHub to use, folder location, and scratch definition file. Upon completion, the following are produced
- New Salesforce scratch org from desired DevHub with specified org definition
- New project directory with org set as default target
- Initialized Git repo and creation of corresponding private GitHub repo (if GitHub CLI is installed)
oc config
Allows you to set default values for:
- DevHub
- Project folder location
- Scratch Definition File
oc devhub
Saves a local list of DevHub orgs that have been authenticated via the CLI. If a devhub does not have an alias, it appears as blank in the list.
oc namespace
Refreshes the list of namespaces associated with your default DevHub org.
oc help
Prints all commands and brief descriptions of each.
oc --version
Prints the current version of Quick Org Creator.
brew update
brew upgrade quick-org-creator
- New Salesforce scratch org from desired devHub with specified org definition
- New project directory with org set as default target
- Initialized Git repo and creation of private GitHub repo
- A cleanup script to clear out old
node_modules
folders - If a config value is missing, prompt for it
- Org picker based on authenticated dev hub orgs
- Directory picker based on folders available from run location
✔️ Issue 3 - Check for repo updates ✔️ Include a readme file in each directory containing more details about the scratch org, why it was created, etc
./build/local.sh
Uninstalls any existing version of oc
, builds from local directory and installs from locally produced bundle tmp-quick-org-creator.tar.gz
. Once built, can be run using oc
alias.
./build/restoreProd.sh
Removes locally built version of package and installs from tap.
Assumes all changes to scripts and templates are committed and merged into main.
versionNumber=#.#.#
git pull origin develop
git merge main
>> this should say that it is already up to date. If not, merge.
git checkout main
git merge develop
git push origin main
git tag -a v{versionNumber} -m {versionNumber}
echo -n $versionNumber>VERSION
git tag -a v${versionNumber} -m ${versionNumber}
git push origin v${versionNumber}
- In GitHub, create new release from tag.
- Copy link to tarball
- Fetch SHA-256 using tarball url
curl -L {tarballUrl} | shasum -a 256
- Update
./Formula/quick-org-creator.rb
and replace url and sha contents. - Commit all changes and push to main
unset versionNumber
git push origin main
git checkout develop
git merge main
git push origin develop
- Now
main
anddevelop
will be at the same commit hash.