Skip to content
Snippets Groups Projects
fabfile.py 667 B
#!/usr/bin/env python
from fabric.api import task, local, settings

@task
def publish ():
    build ()
    for dist in ['wheezy', 'jessie', 'sid']:
         local ('''reprepro includedeb ''' + dist + ''' ../dcpman_*.deb''')
    local ('''fab -f $REPREPRO_BASE_DIR/fabfile.py publish''')
    clean ()

@task
def build ():
    local ('''git dch -a''')
    local ('''dpkg-buildpackage''')

@task
def clean ():
    with settings(warn_only=True):
        local ('''rm ../dcpman_*''')
        local ('''rm -r debian/dcpman.substvars debian/dcpman.prerm.debhelper\
        debian/dcpman.postinst.debhelper debian/dcpman.debhelper.log\
        debian/dcpman debian/files''')