Exemplo n.º 1
0
    if o in ("-a", "--app"):
        app = a
    if o in ("-c", "--container"):
        container = a

if (app is None) and (container is None):
    sys.stderr.write("-c or -a must be specified.\n")
    usage()
    exit(1)

src = None
dst = None
if container:
    src = os.path.join(os.path.dirname(__file__), "../container",
                                container)
    dst = webjourney.config.container_url

else:
    src = os.path.join(os.path.dirname(__file__), "../app",
                                container)

if not os.path.exists(src):
    sys.stderr.write("couchapp root (%s) not found.\n" % src)
    exit(3)

p = push(src, dst)

print "Update: OK"

exit(0)
Exemplo n.º 2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2010 Yohei Sasaki <*****@*****.**>
#
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
import os
import sys
import subprocess

sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import webjourney
from webjourney.couchapputil import push

# install container
print "Deploying container application to %s" % webjourney.config.container_url
push("container/webjourney", webjourney.config.container_url)
push("container/vendor", webjourney.config.container_url)

# TODO: install apps
print "Deploying open social applications to %s" % webjourney.config.container_url

print """
All installation processes have been completed successfully.
Please visit the top page at:

%s
""" % webjourney.config.site_top_url

exit(0)