smarterclayton/openshift-go-cart

Cartridge removes the .openshift directory on install

OllieRunsBikes opened this issue · 3 comments

I have been working with the go cartridge and it is excellent, thank you for the work. I think I have found a problem where on the install of an application the .openshift directory gets removed from $OPENSHIFT_REPO_DIR

I have setup a cron directory in .openshift and installed the cron cartridge and created the directories and git pushed to openshift:

screen shot 2014-05-18 at 10 03 18

When I then go into the $OPENSHIFT_REPO_DIR from where the cron files are run there is no .openshift directory:

screen shot 2014-05-18 at 10 09 02

I think line 91 in compile might be the offending line:

rm -rf $build/.openshift # this removes the constructed $GOPATH

But I am unsure of what further effect this might have. I will have a go and fix it but thought some one might have a quick solution to the bug.

So I forked and commented out the line 91 in complie:

#rm -rf $build/.openshift # this removes the constructed $GOPATH

This resulted in the .openshift directory being left in place but it also left the ./openshift/g directory which needs to be removed so the fix is for line 9 of compile.

rm -rf $build/.openshift/g # this removes the constructed $GOPATH

screen shot 2014-05-19 at 19 25 05

I have created a pull request and am closing this issue as this hopefully fixes the issue.

screen shot 2014-05-19 at 19 37 29

I just ran into this issue with a go app I have running in openshift. Has the pull request not been accepted yet?