Hi
We are planning to migrate from PB 11 to PB 2017R2 to be able to use git in our powerbuilder app (right now we use git for everything else and svn for PB apps)
The git integration seems to work well when the PB source are alone on the repository. It seems to create the .git folder required.
Our problem is that we need to have the powerbuilder app git repository shared with other app on the same git repository. Each app have its own folder, resulting in that kind of directory structure :
- .git (already existing git folder repository where we also want the PB app)
- PowerbuilderApp
- AnotherApp
- AnotherApp
So, as soon as we add the source control to git to the powerbuilder app, it is creating in own .git folder in the PowerbuilderApp folder (as a separate git repo). The only way I was able to workaround that was to setup the source control to git in the PowerbuilderApp (to have the ws_objects folder generated and make the PB think that is setup for source control properly) and then delete the .git folder in the PowerbuilderApp folder.
After that, I am able to keep all apps in the same repo in the root .git folder repository. But, this “solution” have 2 concerns for us:
1) We will not be able to use any of the PB integration of git (because doing so will recreate the .git folder in the PowerbuilderApp folder and we are back withanother repo again). We will have to do all the git command outside of powerbuilder with git bash like we do for the already existing repo with other non-pb app.
2) I am doing the powerbuilder only to have the ws_objects generated, but I’m scared that at some point PB will detect that it dosen’t have git setup properly and stop generating those ws_objects. Because I’m not sure what is the “relation” between pbl and ws_object and the git repo ?
In brief, is there another way to do things to have the powerbuilder app in the same git repository with other apps? Is it something that I’ve missed?
This git integration is really critical for us to be able to work with PB 2017
Thanks for your help
Thanks for the tip, I didn't know about git submodules.
It seems to require extra commands like "git submodule update" to work. Do you know if powerbuilder 2017 R2 support those extra commands ?
On the other hand, I just realize that this Git Submodules may still not work for you. Because when the repository is not created by PowerBuilder using Add to Source Control or Connect to Workspace, you will not be able to use the Git integration from PowerBuilder, even when you cloned the repository that has been uploaded with PowerBuilder to the Git server with a Git client tool. So you will still need to do the PB development on a separate repository that initiated or cloned (Connect to Workspace) from PowerBuilder.
But if you still want to put all your source code together, the only option that I can think of is to create the repository from PB and then put the other non-PB projects inside the root folder.. Then you can put your PB target in a sub-folder so the root folder won't be filled with PBLs. The folder structure would be something like this:
- PowerbuilderApp
- AnotherApp
- AnotherApp
- ws_objects
- myworkspace.pbw