Skip to content
Snippets Groups Projects
Commit 90d104d9 authored by nimrod's avatar nimrod
Browse files

Use Fabric's module instead of rsync manually.

parent c256af18
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,5 @@ My Debian repository, minus the state (packages, db, etc.). ...@@ -6,6 +6,5 @@ My Debian repository, minus the state (packages, db, etc.).
todo todo
---- ----
- Use Fabric's module instead of rsync manually.
- License. - License.
- Add GPG key. - Add GPG key.
#!/usr/bin/env python #!/usr/bin/env python
from fabric.api import task, local from fabric.api import task, local, env, hosts
from fabric.contrib.project import rsync_project
from os import environ
env.use_ssh_config = True
@task @task
@hosts('www.shore.co.il')
def publish(): def publish():
local('''rsync -az --del --exclude="conf/" --exclude="db/" \ rsync_project(remote_dir='''/var/www/htdocs/www.shore.co.il/repo''',
--exclude="fabfile.*" --exclude="lists/" $REPREPRO_BASE_DIR\ exclude=['''fabfile.*''', 'lists/', 'conf/', 'db/'],
www.shore.co.il:/var/www/htdocs/www.shore.co.il/repo/''') local_dir=environ['REPREPRO_BASE_DIR'],
delete=True,
extra_ops='-z')
@task @task
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment