Skip to content

gitclone: allow to create symlink in repository after clone or pull

Alain Takoudjou requested to merge alain-link into master

Add option to create symlink in repository folder after clone. This can be useful to link git submodules files/folder in their good location.

For example:

[repository-test]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/erp5.git
link-list = 
  doc-bt5/erp5_slapos_tutorial bt5/erp5_slapos_tutorial
  doc-bt5/erp5_slapos_tutorial_data bt5/erp5_slapos_tutorial_data

After the repository is cloned with submodule in doc-bt5, a symlink will be created to repository_location/doc-bt5/erp5_slapos_tutorial into repository_location/bt5/erp5_slapos_tutorial in order to place doc-bt5 business templates into bt5 folder.

After the repository part is installed,

$ cd $repository
$ git status                                                                                     
On branch master                                                                     
Your branch is up to date with 'origin/master'.                                         
                                                                                                 
Untracked files:                                                                                 
  (use "git add <file>..." to include in what will be committed)                                 
                                                                                                 
        bt5/erp5_slapos_tutorial
        bt5/erp5_slapos_tutorial_data

Merge request reports