The development process for this process is described in more detail in Development document.
-
Install
nvmpackage. This allows you to install different versions of the Node.js -
Check which Node version you are running:
nvm ls
-
Use at least version
v20nvm use v20
-
Install
npm(ONLY when new changes are introduced topackage.json)npm install
-
Create a feature branch
git checkout -b my-feature-branch
-
Run it locally
npm run dev
-
Make your changes and commit them
git commit -m "[ADMIN | DEV | PM] My changes" -
Push your changes to GitHub
git push origin my-feature-branch
Not all changes are needed to be deployed to Pre Production. Consider if the change is critical.
In case those changes are critical, proceed to Deployment in Pre Production Server
If you have done merge to the
PPRD-deploymentbranch, DO NOT delete your feature branch. That branch will later serve as a reference to merge intomain.DO NOT merge
PPRD-branchintomain. Always merge your feature branch if everything is valid in either local dev or PPRD environment.If the changes are not valid in Pre Production, you can delete
PPRD-deploymentbranch and recreate it frommainbranch.
On your local computer, open terminal and position to the folder where you want to manage the folder for this new mirrored repository. Then run the following commands:
git clone --mirror https://github.com/OpenMobileAlliance/oma-knowledge-base.git oma-knowledge-base-PPRD-mirrorcd oma-knowledge-base-PPRD-mirrorgit remote set-url --push origin https://github.com/OpenMobileAlliance/oma-knowledge-base-PPRD-mirror.gitIn the original oma-knowledge-base folder where you have been working normally, make any changes that you want to make
NOTE: Merging
PPRD-deploymentbranch intomainor any other branch is NOT allowed. Always merge your feature branch intomain.
You can either Merge or recreate the PPRD-deployment Branch:
-
Merge:
Merge the changes into the
PPRD-deploymentbranch (or do a pull request) Push to GitHub as normal. -
Recreate the branch:
git push origin --delete PPRD-deployment
git branch -D PPRD-deployment
git checkout -b PPRD-deployment
git push --set-upstream origin PPRD-deployment
Then when you want to publish to pprdwww.openmobilealliance.org, in terminal, go to the oma-knowledge-base-PPRD-mirror folder and run the following commands:
git fetch -p origingit push --mirror(Note: the
git push --mirrorcommand will give lots of errors. That's because it doesn't support pull request references. It's not a problem so you can ignore those errors)
What the setup is doing is cloning the source repository to a local folder called oma-knowledge-base-PPRD-mirror. The --mirror option is important as it's making sure absolutely everything is going to be included. Then we are changing the push location using the remote set-url command of this newly cloned repository to the location of the PPRD mirror in GitHub. What this means is that when you do a fetch, it pulls it from the original repository (oma-knowledge-base). And when you do a push, it's doing it to the PPRD mirror (oma-knowledge-base-PPRD-mirror) repository. So in effect, to publish to pprdwww.openmobilealliance.org, you just run those 2 commands.
- Repository: https://github.com/OpenMobileAlliance/oma-knowledge-base-PPRD-mirror
- Server: https://pprdwww.openmobilealliance.org/
- Diagram:
