コード例 #1
0
"""

from gae_ext_runtime import ext_runtime

from googlecloudsdk.api_lib.app import ext_runtime_adapter
from googlecloudsdk.api_lib.app.runtimes import python
from googlecloudsdk.api_lib.app.runtimes import python_compat
from googlecloudsdk.core import exceptions
from googlecloudsdk.core import log

RUNTIMES = [
    # Note that ordering of runtimes here is very important and changes to the
    # relative positions need to be tested carefully.

    # Custom comes first, if we've got a Dockerfile this is a custom runtime.
    ext_runtime_adapter.CoreRuntimeLoader('custom', 'Custom', ['custom']),

    # Go's position is relatively flexible due to its orthogonal nature.
    ext_runtime_adapter.CoreRuntimeLoader('go', 'Go', ['go', 'custom']),
    ext_runtime_adapter.CoreRuntimeLoader('ruby', 'Ruby', ['ruby', 'custom']),
    ext_runtime_adapter.CoreRuntimeLoader('nodejs', 'Node.js',
                                          ['nodejs', 'custom']),
    ext_runtime_adapter.CoreRuntimeLoader('java', 'Java',
                                          ['java', 'java7', 'custom']),
    python_compat,

    # Python and PHP are last because they match if any .py or .php file is
    # present.
    ext_runtime_adapter.CoreRuntimeLoader('python', 'Python',
                                          ['python', 'custom']),
    ext_runtime_adapter.CoreRuntimeLoader('php', 'PHP', ['php', 'custom']),
コード例 #2
0
from googlecloudsdk.api_lib.app import ext_runtime_adapter
from googlecloudsdk.api_lib.app.runtimes import go
from googlecloudsdk.api_lib.app.runtimes import java
from googlecloudsdk.api_lib.app.runtimes import python
from googlecloudsdk.api_lib.app.runtimes import python_compat
from googlecloudsdk.api_lib.app.runtimes import ruby
from googlecloudsdk.core import exceptions
from googlecloudsdk.core import log

RUNTIMES = [
    # Note that ordering of runtimes here is very important and changes to the
    # relative positions need to be tested carefully.

    # Custom comes first, if we've got a Dockerfile this is a custom runtime.
    ext_runtime_adapter.CoreRuntimeLoader('custom', 'Custom', ['custom']),
    go,  # Go's position is relatively flexible due to its orthogonal nature.
    ruby,
    ext_runtime_adapter.CoreRuntimeLoader('nodejs', 'Node.js',
                                          ['nodejs', 'custom']),
    java,
    python_compat,
    python,  # python is last because it passes if there are any .py files.
]


class UnidentifiedDirectoryError(exceptions.Error):
    """Raised when GenerateConfigs() can't identify the directory."""
    def __init__(self, path):
        """Constructor.