Another way to work with Relic Package Manager source

When we did the last clone of the Relic Package Manager Source we kept the Git repository separate to the RDi repository on our PC. I mentioned that perhaps there is an alternative to copying the files between the directories. I like the idea of keeping the code sources separate and copying the code from one side to the other as it allows you to determine which code you push back to the repository and which you keep to yourself.

In this instance we want the code to reside with the base code in the repository so we are happy that all of the content we build will be pushed back to the repository. A lot of the processes we followed to create the objects are the same as we did for the original post, the content in this post just shows the changes.

We created a new Workspace in RDi called RELIC_1, we still have the original Workspace so this gives us a clear line of separation.

new workspace RELIC_1

new workspace RELIC_1


Create the clone of the repository in the RDi location, we do this before creating the project as we encountered a few problems with the reverse.

Git Clone location

Git Clone location

Source is installed, Open new perspective from RSE perspective and add new IBM i project to the workspace.

Create new IBM i Project

Create new IBM i Project

We will have to call this the same name as the Git Repository location otherwise RDi complains about an overlapping project.

New project

New project

We still have the RELICSRC library installed so we are going to call the new library RELICSRC1, If you are merging the first and second methods of doing this and you don’t have that library created yet you can use RELICSRC.

IBM i source library

IBM i source library

We had an internal error (missing arguments) when we ran the request but the content was added to the project.

Project created and source is available

Project created and source is available in project


Push the changes from the Project view to the remote system, this will create the library and the source file for you. Notice in the image above that the RELICSRC1 library does not exist at this point.

Push code to IBM i

Push code to IBM i


Now the content is available in all the right places, you can carry out the creation and build of the new CLP as per the previous blog entry. Because we have already done that we are simply going to add the source member from the other install into this one and push the changes to the remote system for build. The biggest change now is that we can see the file is marked as changed by Git and placed into the Unstaged Changes view, this is where we will now commit those changes.

New file already in unstaged changes window

New file already in unstaged changes window

We are only interested in the BLDRELIC.CLP file so we will put it into the Staged Changes ready for the commit. You can drag and drop the file to the window. We will now add the commit message and Commit and Push the update.

Ready to commit to master

Ready to commit to master

Now the changes are stored on the remote repository.

New code is now available in the repository

New code is now available in the repository

We are added as a maintainer to the repository which allows us to contribute to the master but the correct method would be to do a Pull request and create another branch so the master branch is not polluted. We hope to cover that in another Blog entry.

 

Enjoy Chris..