コード例 #1
0
ファイル: lifecycle.py プロジェクト: jeffarrieta/snapcraft
def init():
    """Initialize a snapcraft project."""
    snapcraft_yaml_path = lifecycle.init()
    echo.info("Created {}.".format(snapcraft_yaml_path))
    echo.wrapped(
        "Go to https://docs.snapcraft.io/the-snapcraft-format/8337 for more "
        "information about the snapcraft.yaml format.")
コード例 #2
0
ファイル: test_lifecycle.py プロジェクト: torusJKL/snapcraft
 def _create_classic_confined_snapcraft_yaml(self):
     snapcraft_yaml_path = lifecycle.init()
     # convert snapcraft.yaml into a classic confined snap
     with fileinput.FileInput(snapcraft_yaml_path, inplace=True) as f:
         for line in f:
             print(line.replace('confinement: devmode',
                                'confinement: classic'),
                   end='')
コード例 #3
0
ファイル: test_lifecycle.py プロジェクト: josepht/snapcraft
 def _create_classic_confined_snapcraft_yaml(self):
     snapcraft_yaml_path = lifecycle.init()
     # convert snapcraft.yaml into a classic confined snap
     with fileinput.FileInput(snapcraft_yaml_path, inplace=True) as f:
         for line in f:
             print(line.replace('confinement: devmode',
                                'confinement: classic'),
                   end='')
コード例 #4
0
def init():
    """Initialize a snapcraft project."""
    try:
        snapcraft_yaml_path = lifecycle.init()
    except errors.SnapcraftEnvironmentError as e:
        echo.error(e)
        sys.exit(1)
    echo.info('Created {}.'.format(snapcraft_yaml_path))
    echo.info('Edit the file to your liking or run `snapcraft` to get started')
コード例 #5
0
ファイル: test_lifecycle.py プロジェクト: torusJKL/snapcraft
    def test_core_setup_skipped_if_not_classic(self):
        lifecycle.init()
        lifecycle.execute('pull', self.project_options)

        self.assertThat(self.witness_path, Not(FileExists()))
コード例 #6
0
def init():
    """Initialize a snapcraft project."""
    snapcraft_yaml_path = lifecycle.init()
    echo.info("Created {}.".format(snapcraft_yaml_path))
    echo.info("Edit the file to your liking or run `snapcraft` to get started")
コード例 #7
0
ファイル: lifecycle.py プロジェクト: cholcombe973/snapcraft
def init():
    """Initialize a snapcraft project."""
    snapcraft_yaml_path = lifecycle.init()
    echo.info('Created {}.'.format(snapcraft_yaml_path))
    echo.info(
        'Edit the file to your liking or run `snapcraft` to get started')
コード例 #8
0
ファイル: test_lifecycle.py プロジェクト: josepht/snapcraft
    def test_core_setup_skipped_if_not_classic(self):
        lifecycle.init()
        lifecycle.execute('pull', self.project_options)

        self.assertThat(self.witness_path, Not(FileExists()))