Web app
Customizations to the Origin by Corvus Web App can be performed in cases where you need to customize branding, alter localization strings, or fulfill security requirements that are not immediately offered out-of-the-box.
Customization steps
With that in mind, customizing and deploying your Origin by Corvus Web App can be done in a few steps:
-
Fork the origin repository and then clone your fork in your local environment.
git clone https://github.com/<yourgithubusername>/origin -
Create a separate branch for your customized version, as it's not recommended to perform them in the
masterbranch (more details about that in the next section regarding rebasing).git checkout -b custom_branch -
Perform customization tasks by replacing image assets, changing strings, altering the UI, and whatever else may be necessary. Be mindful not to violate any of the guidelines on trademark use during this process.
-
Once customization has been completed, build the files that will be used in your deployment and generate
origin-webapp.tar.gzcontaining them.make dist -
In a Origin by Corvus deployment, rename
client(assuming Origin by Corvus was deployed in the$HOMEdirectory).cd ~/originmv client client-original -
Transfer compressed
distfiles inside Origin by Corvus'sclientdirectory, and decompress it.tar -xvf origin-webapp.tar.gz -
Copy the
productssubdirectory from the original deployment into the customized one.cp -R client-original/products client/products
Rebasing to latest version
Challenges arise when creating a separate custom branch from an active open-source project like origin. As the project gets new commits and pull requests on a daily basis, your custom webapp can quickly become outdated.
To deal with that, you'll need to leverage Git's interactive rebasing functionality in the following way:
-
Add an upstream with the original
originrepository.git remote add upstream https://github.com/origin/origin.git -
Update
masterbranch to latest upstream commit.git checkout mastergit pull upstream master -
Perform interactive rebase.
git checkout custom_branchgit rebase -i master
Use `git rebase --continue` after resolving any conflicts that arise during rebase process
-
Push new version back to remote (Note: Rebasing requires that you override previous remote version with a
forcepush. Be sure you've tested that your rebase was successful before completing this last command).git push -f origin custom_branch