예제 #1
0
def setup(c: Connection, commit=None, release=None):
    print('== Setup ==')
    if release is None:
        c.release = timestamp(c)
    else:
        c.release = release
    c.deploy_path = path.deploy_path(c)
    c.repo_path = path.repo_path(c)
    c.releases_path = path.releases_path(c)
    c.current_path = path.current_path(c)
    c.shared_path = path.shared_path(c)
    c.release_path = path.release_path(c)
    if commit is None:
        c.commit = c.deploy.branch
    else:
        c.commit = commit
    print('release: {}'.format(c.release))
    print('commit: {}'.format(c.commit))
    create_dirs(c)
    if not path.file_exists(c, '{}/venv/bin/activate'.format(c.shared_path)):
        create_venv(c)
예제 #2
0
def create_release(c: Connection):
    print('-- Creating release')
    git.check(c)
    git.update(c)
    c.commit = git.revision_number(c, c.commit)
    git.create_archive(c)