Skip to content

OpenMobileAlliance/oma-knowledge-base

Repository files navigation

oma-knowledge-based

Development

The development process for this process is described in more detail in Development document.

Get Started

  1. Install nvm package. This allows you to install different versions of the Node.js

  2. Check which Node version you are running:

    nvm ls
  3. Use at least version v20

    nvm use v20
  4. Install npm (ONLY when new changes are introduced to package.json)

    npm install
  5. Create a feature branch

    git checkout -b my-feature-branch
  6. Run it locally

    npm run dev
  7. Make your changes and commit them

    git commit -m "[ADMIN | DEV | PM] My changes"
  8. 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 into main.

    DO NOT merge PPRD-branch into main. 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-deployment branch and recreate it from main branch.

Deployment in Pre Production Server

1. Setup (you only need to do this once)

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-mirror
cd oma-knowledge-base-PPRD-mirror
git remote set-url --push origin https://github.com/OpenMobileAlliance/oma-knowledge-base-PPRD-mirror.git

2. Make Your Changes

In the original oma-knowledge-base folder where you have been working normally, make any changes that you want to make

NOTE: Merging PPRD-deployment branch into main or any other branch is NOT allowed. Always merge your feature branch into main.

You can either Merge or recreate the PPRD-deployment Branch:

  • Merge:

    Merge the changes into the PPRD-deployment branch (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

3. Publication

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 origin
git push --mirror

(Note: the git push --mirror command 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)

* The explanation

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.

Information

Releases

No releases published

Packages

No packages published

Contributors 11