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:
i43-new-feature
in this case). For base, select test
test
branch. The changes you just pushed on your branch should be highlighted. Verify the changes and make sure to write a descriptive comment.test
for you.h2.2.22
branchh2.2.22
branch, 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.
git clone -b 2.2.22 https://github.com/hubzero/hubzero-cms.git
(only needs to be done once)hubzero-cms/core/plugins/publications/
then the copied folder should go to hsscommons/plugins/publications
git add, commit and push
the files that have just been copied over.This code maintains the MIT licence of the original files.