Exemplo n.º 1
0
 def __init__(self):
     downloader.download_code()
     os.chdir(config.DOCS_DIR)
Exemplo n.º 2
0
import datetime
import shutil
import config


def exclude_gitdir(file):
    """
	This function searches for the git directory, if available, it will be
	excluded from the nightly.
	"""
    _return = False
    if file.find('.git/') > -1:
        _return = True
    return _return


downloader.download_code()

print " >> Compressing tar.gz file..."
now = datetime.datetime.now().strftime('%Y%m%d')
fname = 'ecidadania-nightly-%s.tar.gz' % now

f = tarfile.open(fname, 'w:gz')
f.add('ecidadania/', exclude=exclude_gitdir)
f.close()

print " >> Copying the file into destination..."
try:
    shutil.copy(fname, config.DOWNLOADS_DIR)
except:
    print " EE Couldn't copy the nighly."
Exemplo n.º 3
0
 def __init__(self):
     downloader.download_code()
     os.chdir(config.DOCS_DIR)
import downloader
import tarfile
import datetime
import shutil
import config

def exclude_gitdir(file):
	"""
	This function searches for the git directory, if available, it will be
	excluded from the nightly.
	"""
	_return = False
	if file.find('.git/') > -1:
		_return = True
	return _return

downloader.download_code()

print " >> Compressing tar.gz file..."
now = datetime.datetime.now().strftime('%Y%m%d')
fname = 'ecidadania-nightly-%s.tar.gz' % now

f = tarfile.open(fname, 'w:gz')
f.add('ecidadania/', exclude=exclude_gitdir)
f.close()

print " >> Copying the file into destination..."
try:
	shutil.copy(fname, config.DOWNLOADS_DIR)
except:
	print " EE Couldn't copy the nighly."