-
Notifications
You must be signed in to change notification settings - Fork 8
Upgrading VTechWorks for DSpace point releases
This page lists the commands necessary to upgrade VTechWorks to a new DSpace point release. In this document, the commands listed were to upgrade from DSpace 5.3 to DSpace 5.4.
First, make sure that the development branch in your local repository is up to date with the latest changes on GitHub. In this example, the development branch is called "vt_5_x_dev". This is specific to Virginia Tech, and is the branch used for DSpace 5 development.
Commit or stash any pending changes. Then type these commands:
git checkout vt_5_x_dev
git status
git pull
You should now have an up-to-date copy of the VTechWorks development source tree.
Next, you will create a new branch on your local repository to perform the updates. In this example, the new branch is called "add_5_4_changes". This can be named anything; in this case it refers to the 5.4 version number.
git checkout -b add_5_4_changes
This new branch has been created based on the vt_5_x_dev branch.
In order to merge the changes from the main DSpace project where the upgrade was released, you will add a reference to the main DSpace repository in your local repository, and refer to it as "upstream".
git remote add upstream https://github.com/DSpace/DSpace.git
Now, from your local repository, the VTechWorks repository on GitHub is referred to as origin (as it was previously) and the central DSpace repository on GitHub is referred to as upstream.
Now, it's time to get the changes from the DSpace "upstream" repository and merge them into your local branch of the VTechWorks source tree.
git pull upstream dspace-5_x
Occasionally, changes that were made to the central DSpace repository will conflict with changes that have already been made to the VTechWorks repository. These conflicts will need to be resolved before continuing.
The git book has a section about resolving merge conflicts.
After the conflicts have been resolved, perform:
git commit
According to https://wiki.duraspace.org/display/DSDOC5x/Advanced+Customisation,
"Maven WAR Overlays
Much of the customisation described in the JSPUI and XMLUI customisation sections is based on Maven WAR Overlays. In short, any classes or files placed in [dspace-source]/dspace/modules/* will be overlayed onto the selected WAR. This includes both new and amended files."
This mean that one needs to do a comparison of all the new files to see which ones are overlayed in our modules folder. Then one needs to copy those changes to our version of the file in modules.
The DSpace project doesn't have a theme called vtmirage2, which we created. We added it as an overlay, but the overlay adds to the project rather than replaces files. However, there may be files in our theme that will need to be merged with the files from the point release. And they may be in a slightly different directory.
For example, in the DSpace 5.5 update, a file was changed in https://jira.duraspace.org/browse/DS-2893. That file, dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/_general.scss
is overlayed in our repository at dspace/modules/xmlui-mirage2/src/main/webapp/themes/vtmirage2/styles/classic_mirage_color_scheme
.
Get old_commit #
git checkout vt_5_x_dev
git log
Get new_commit #
git checkout add_5_4_changes
git log
Get list of files that have changed
git diff --name-only vt_5_x_dev add_5_4_changes
In BBEdit, copy and past the list of files to remove pom.xml files from the list
find: ^.*/pom\.xml\r
replace:
settings: selection only, grep
Get list of files in modules/
cd dspace/modules
find ./*/src -type f ! -name ".gitignore"
Compare this list of files in modules/ to the first list of changes. If a file in the changed point release is the same as one in modules, copy changes from the changed point release files into the respective files in modules/. A suggestion for doing this is to diff the files in the original locations (not in the modules folder), for example in the dspace/dspace-api/ folder (not in the dspace/modules/additions folder).
Follow the instructions in the Making Changes on the Local Development Environment document for building DSpace and deploying it to your Local Development Environment.
For ideas about what to test, you can look on this page. Also pay attention to new features.
Now that the changes have been merged into your new branch and you have started testing on your local system, you can also push the new branch up to GitHub to make it easier for others to test.
git push --set-upstream origin add_5_4_changes
When testing is successful and the updates can be merged back into VTechWorks , create a pull request into the development branch per the standard procedure on GitHub.
The pull request can be marked with WIP in the title to indicate that it is a work in progress, and to request that it not be merged just yet.