This repository contains code modified for the HSSCommons project by CANARIE. It acts as an overlay to the HUBzero CMS code to customize HUBzero for use by HSSCommons.****
The HSSCommons git repository consists of two main branches: test and h2.2.22.
The test branch is associated with the test instance of the HSSCommons site.
This code should be placed in the /app folder of the HUBzero CMS. It is currently developed against version 2.2.22 of HUBzero.
Start by running the following:
$ git clone -b test https://github.com/etcluvic/hsscommons.git # Clone 'test' branch
$ git checkout -b i43-new-feature # Create a new branch, named after
# an issue number and description
You can start making changes to the code. After finishing making changes:
$ git add <file name> # State changes for each file
$ git commit -m '<commit message>' # commit your changes
There are two cases that can happen here.
Case 1: If there are changes in the test branch from when you pulled the branch, run:
$ git checkout test # Switch back to 'test' branch
$ git pull origin test # Pull the latest changes on 'test'
$ git checkout i43-new-feature # Switch back to your feature branch
$ git merge test # Merge the new changes in 'test' branch into your feature branch
$ git push origin i43-new-feature # Push your changes to the feature branch on the remote server
Case 2: If test branch stays the same from when you pulled the branch, just run:
$ git push origin i43-new-feature # Push your changes to the feature branch on the remote server
If you think your branch is ready to merge, create a Pull Request as follow:
- Visit HSSCommons GitHub repository
- Click Pull Requests, select New pul request
- For compare, select your branch (
i43-new-featurein this case). For base, selecttest - Compare the changes between the your branch and the
testbranch. The changes you just pushed on your branch should be highlighted. Verify the changes and make sure to write a descriptive comment. - Click Create Pull Request
- One of the team members will review the branch, and merge it into
testfor you. - If the feature works well on the Test Instance, the team member will merge it into
h2.2.22branch - To have the h2.2.22 instance reflect the changes in the
h2.2.22branch, we need to create a ticket with UVic Systems.
To continue working on the next feature, simply repeat the process above, start with running:
$ git checkout -b i44-next-new-feature # Create a new branch for the next new feature
The work process can be described in the chart below:
flowchart TD
id1(git clone -b test https://github.com/etcluvic/hsscommons.git) --> id2(git checkout -b i43-new-feature)
--> id3(work on it, make changes) --> id4(git add <file_name>) --> id5(git commit -m 'Message')
-- Still have untracked files --> id4(git add <file_name>)
id5 -- There are changes in 'test' --> id6(git checkout test) --> id7(git pull origin test)
--> id8(git checkout i43-new-feature) --> id9(git merge test) --> id10(git push origin i43-new-feature)
id5 -- No changes in 'test' --> id10
id10 -- Work on the next feature --> id2
As mentioned above the code in this repository acts as an overlay to the Hubzero CMS code. To make new customizations to files that exist in the hubzero-cms core but not in this repository follow the following steps.
- Clone the hubzero-cms repo somewhere on your system using
git clone -b 2.2.22 https://github.com/hubzero/hubzero-cms.git(only needs to be done once) - Copy the directory you want to modify from the hubzero-cms to the hsscommons local repo on your system. Ensure to maintain the directory structure as much as possible. For example if the folder exists in
hubzero-cms/core/plugins/publications/then the copied folder should go tohsscommons/plugins/publications git add, commit and pushthe files that have just been copied over.- Make any modifications to the copied files.
This code maintains the MIT licence of the original files.