[Vtigercrm-developers] Tips on how to setup vtiger dev environment

Uma S uma.s at vtiger.com
Tue Apr 28 06:24:38 GMT 2020


Hi,

I would like to share about workflow, which we are finding useful over
years.

We are making use of netbeans editor, which helps us to maintain the copy
of git branch in other locations. So I will place a copy on the server
(/var/www) for installation.

Any changes made to git copy will be clean and easy to commit, And changes
can be easily pulled from master to keep it up to date.

As these both source copies are in sync via Netbeans, Any changes you make
as part of fix will be copied to installed copy instantly. So that we can
overcome manual copy.

>>Ruben, Mentioned on every update we will need to install again.
You can avoid this by making config.inc.php file permission to 555 in
installed copy. So that it will not be overwritten.

>> Issue with Untracked files.
As the working copy is under git control, You have to set fileMode to false
using this command  'git config code.fileMode false'.

>>Changes made to pkg files, need to be copied to installed files.
Yes! This is a must, As it's a clean copy but we can write some script for
this to copy from pkg files to installed files as the pkg folders are in
sync with the clean copy.

Hope! this might help few of you :)

Stay home, Stay Safe.



On Sat, Apr 25, 2020 at 8:38 AM Rubén A. Estrada Orozco <rulotec1 at gmail.com>
wrote:

> Hi Alan!
>
> I actually tested your approach. Did some work on translations and
> symlinked the whole es_mx translation folder. It's easier that way
> because the git repository stays clean.
>
> There's only one thing I don't like. Let's say you want to make further
> development but you first want to have the latest changes on vtiger master
> branch. You would pull the changes from the vtiger master branch. But then
> the problem is that you have to install vtiger again to have an updated
> test system. Do you have a way around that? Or did I get something wrong?
>
> Matteo, thanks for your response, I'm not really familiar with Docker, but
> will take a look into it.
>
>
>
>
>
> Saludos
>
> Rubén
>
>
> On Wed, Apr 22, 2020 at 11:32 AM Matteo Baranzoni <info at greenbitweb.com>
> wrote:
>
>> We have docker based development environment.
>>
>> Docker image contain standard codebase and when we need to hack core file
>> we add it (with relative path) to config file and add it to docker project
>> (under "debug" folder) so we can fix core file and track all changes
>> easily.
>>
>> Also
>> - we implement tool that backup customer CRM and restore it on local
>> docker env for test locally
>> - we create 2 module where we implement new functionality without change
>> core (example inventory or layout related stuff)
>> - many script allow code quality check and make easy work development.
>>
>> This allow us to reduce core changes do only 2 file:
>> - inludes/runtime/Viewer.php (we develop custom responsive template)
>> - one other related to login (we have tool that force password change).
>>
>>
>>
>> Il giorno mer 22 apr 2020 alle ore 11:16 Sukhdev Mohan <s.mohan at myti.it>
>> ha scritto:
>>
>>> Hi,
>>> We are trying to do the same, trying to keep track of core and custom
>>> developments… No luck so far, so if anyone has idea on how this might work
>>> please share
>>>
>>> Best Regards,
>>> Sukhdev Mohan
>>> ———————————
>>> Cel. (+39) 320 7020345
>>> Email s.mohan at myti.it <s.mohan at myti.it>
>>>
>>>
>>>
>>>
>>> Il giorno 21 apr 2020, alle ore 21:49, Alan Lord <alanslists at gmail.com>
>>> ha scritto:
>>>
>>> I guess the silence means none of us has a "really" good solution ;-)
>>>
>>> What I do now is like this... I only manage _changed_ vtiger files in a
>>> project or customer or custom-module git repo (sometimes multiple repos in
>>> one project). I don't clone the whole vtiger tree into these - if I have to
>>> change core code I import the required files along with their standard path
>>> into the relevant repo structure, e.g..
>>>
>>> /root_of_my_repo/modules/Vtiger/models/Model.php
>>> /root_of_my_repo/data/CRMEntity.php
>>> /root_of_my_repo/layouts/v7/modules/Vtiger/RecentActivities.tpl
>>>
>>>
>>> (That last one is actually quite a common one. I have quite a few
>>> customers ask to swap the date/time formatting of the History and Comment
>>> displays so instead of it showing "3 days ago", it shows the actual date
>>> and time stamp and the "3 days ago" bit goes into the title attribute (on
>>> hover).
>>>
>>> On a development server I generally symlink[1] these files and
>>> directories from the test vtiger system back to the repo(s) which are
>>> usually in my home directory. Once the dev work is ready for production I
>>> *copy* the files into the vtiger system. Once a system is in production,
>>> changes tend to be fairly minor so it isn't a big deal to just do a git
>>> pull into the repo on the production server and then copy a few files into
>>> the vtiger directory when something needs to be updated.
>>>
>>> I kind of made this process up as I have gone along and I have no idea
>>> of I am doing it in a "correct way" or not but it works for me.
>>>
>>> FWIW I'd be interested to hear how others manage their dev workflows too.
>>>
>>> [1] There are tests in vtiger code that causes it to die if it tries to
>>> load a symlinked file so these tests have to be disabled in the development
>>> system.
>>>
>>> HTH
>>>
>>>
>>> Al
>>>
>>>
>>> On 21/04/2020 19:28, Rubén A. Estrada Orozco wrote:
>>>
>>> Anyone?
>>> Alan?
>>> Uma?
>>> Saludos
>>> Rubén
>>> On Fri, Apr 17, 2020 at 6:57 PM Rubén A. Estrada Orozco <
>>> rulotec1 at gmail.com<mailto:rulotec1 at gmail.com <rulotec1 at gmail.com>>>
>>> wrote:
>>>    Hi everyone,
>>>    I wonder if someone can share tips on how to setup a git-friendly
>>>    development environment for vtiger.
>>>    The thing is: if you clone the repository and then install vtiger
>>>    you end up with a lot of "Untracked files". Mainly modules and
>>>    translations that live in the pkg folder. If you change translation
>>>    files under the languages folder, you have to copy them back to the
>>>    pkg folder so that you can make a commit. The same applies for
>>>    modules such as Google, ModTracker, etc.
>>>    Furthermore, if you pull changes from the repository and changes
>>>    have been made to files inside the pkg folder, you have to either
>>>    copy them manually to their corresponding "after-install location"
>>>    or install Vtiger again.
>>>    Well, I hope you get the idea...
>>>    Can you share tips on how to organize that? I'm guessing some sort
>>>    of build script would help. Someone has one and is willing to share
>>>    it? any other ideas?
>>>    Have a good weekend and stay healthy!
>>>    Saludos
>>>    Rubén
>>> _______________________________________________
>>> http://www.vtiger.com/
>>>
>>>
>>>
>>> _______________________________________________
>>> http://www.vtiger.com/
>>>
>>>
>>> _______________________________________________
>>> http://www.vtiger.com/
>>
>> _______________________________________________
>> http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/



-- 
With
Best Regards
Uma.S
Vtiger Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20200428/a094ae8d/attachment-0001.html>


More information about the vtigercrm-developers mailing list