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.")
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='')
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='')
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')
def test_core_setup_skipped_if_not_classic(self): lifecycle.init() lifecycle.execute('pull', self.project_options) self.assertThat(self.witness_path, Not(FileExists()))
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")
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')
def test_core_setup_skipped_if_not_classic(self): lifecycle.init() lifecycle.execute('pull', self.project_options) self.assertThat(self.witness_path, Not(FileExists()))