Git vcs relatives methods

pydiploy.require.git.archive(*args, **kwargs)[source]

Creates an archive from a git repository or directly from a project

  • Using at the root path of a local cloned repository. This will create a tar.gz tarball as /tmp/my_project.tar.gz :

    git_archive('my_project')
    
  • Adding prefix in the archive so that a top directory will be extracted and all the files will remain inside it :

    git_archive('my_project', prefix='MyProject/')
    
  • Using outside a cloned repository :

    git_archive('my_project', project_path='/path/to/my_project')
    
  • Specify the tag to export. Default is the HEAD of master :

    git_archive('my_project', tag="1.2")
    
  • Change the format. Now this will create a file /tmp/my_project.zip :

    git_archive('my_project', format="zip")
    
  • Change the saving path. This will a create a file /home/django/my_project.zip :

    git_archive('my_project', path='/home/django')
    
  • Using a remote repository :

    git_archive('my_project',
    remote="git@git.u-strasbg.fr:django-ldapuds.git")
    
pydiploy.require.git.check_tag_exist(*args, **kwargs)[source]

Checks if a tag/branch exists in the repository

pydiploy.require.git.collect_branches(*args, **kwargs)[source]

Collects branches names locally or from a remote repository

pydiploy.require.git.collect_tags(*args, **kwargs)[source]

Collects tags names locally or from a remote repository

Previous topic

Circus relatives methods

Next topic

Nginx relatives methods

This Page